J2K-Codec ™

News
Overview
Download
Order
F.A.Q.
More info
Support
Links

Welcome
QuickStart

ActiveX Control

C++ Wrapper
J2K_Image
open
easyDecode
selectTiles
getMetaData
decode
close
J2K_Frames
open
getFrames
getFrame
operators
close

API Reference
General
getVersion
getLastError
getErrorStr
getLastErrorStr
Unlock
Open / Close
Open
Close
Info
GetInfo
GetInfoEx
GetResolutions
GetResDimensions
GetMetaData
Decoding
EasyDecode
SelectTiles
Decode
Cancel
Debug
StartLogging
StopLogging


J2K_StartLogging


This function creates a log-file and activates logging of the J2K-Codec debug messages.

int J2K_StartLogging(int level, int append);



Log-file will typically contain lines like this:

 24.02 19:14:37.406 | 16E8 | API call: J2K_Decode()

Here, "24.02" is February 24-th, "19:14:37.406" is the current time (hour:min:sec.millisec), 16E8 - Thread ID (hex). After that goes various debug information.

Parameters

level
Logging level. Can be 0 (J2K_LOG_NORMAL) or 1 (J2K_LOG_DETAILED or J2K_LOG_ALL).

append
Flag to signal that the logging session must be appended to the existing log-file (0 - do not append, 1 - append).

Notes

1. Log-file name is 'j2k-codec.log'.

2. If the log is already open the function will only change logging level and return with error.

3. The performance will degrade significantly if the logging is on.

Return value

Returns 0 if there was no error.

Example

J2K_StartLogging(J2K_LOG_DETAILED, J2K_LOG_APPEND);

...

J2K_StopLogging();

See also

J2K_StopLogging()
2004-2008 © Alex Saveliev