LogDirectory Property

The path to a directory for logging.

Syntax

ANSI (Cross Platform)
char* GetLogDirectory();
int SetLogDirectory(const char* lpszLogDirectory); Unicode (Windows) LPWSTR GetLogDirectory();
INT SetLogDirectory(LPCWSTR lpszLogDirectory);
@property (nonatomic,readwrite,assign,getter=logDirectory,setter=setLogDirectory:) NSString* logDirectory;
- (NSString*)logDirectory;
- (void)setLogDirectory:(NSString*)newLogDirectory;
#define PID_AS2RECEIVER_LOGDIRECTORY 40

IPWORKSEDI_EXTERNAL void* IPWORKSEDI_CALL IPWorksEDI_AS2Receiver_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSEDI_EXTERNAL int IPWORKSEDI_CALL IPWorksEDI_AS2Receiver_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

Setting LogDirectory will instruct the component to log the details of each transmission to unique files in the specified directory. For each request processed, the class will log the complete text of the outgoing request and the incoming response.

The class will write multiple log file for each transmission, with separate extensions for each type of data:

Status (.log)Contains information on applied security options and pass/fail status of transmission
Request (.req)Contains the raw incoming request before processing
Payload (.dat)Contains the EDI payload after processing
MDN Receipt (.mdn)Contains the MDN receipt prepared by the receiver
Error (.err)This is only written in an error is encountered, containing the error.

One or more of these logs may be disabled by setting the LogOptions configuration setting.

LogDirectory supports several macros that can be used to specify a unique directory path. If the path specified does not already exist, the class will attempt to create the directory. The following macros are supported:

%MessageID%The MessageID of the AS2 transmission, after it is generated.
%AS2From%The AS2-From field in the transmission
%OriginalMessageID%In MDN Receipts, the MessageID of the transmission that the receipt is for. You can use this to pair asynchronous MDN receipt logs with their transmissions
%Date:Format%%Format% is a platform-specific date/time formatting string. For example:

The filenames will be chosen automatically by the class. Each filename will be the system time, in the format YYYY-MM-DD-HH-MM-SS-MMMM, with extensions "-2", "-3", used in case files of those names already exist. After each transaction is processed LogFile will contain the name of the files just written, minus the extension.

If logs cannot be written an exception will be thrown.

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 C++ Edition - Version 20.0 [Build 8203]