Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

Pantheios file Stock Back-end Flags
[Pantheios file Stock Back-end]


Detailed Description

Flags for the Pantheios file Stock Back-end.


Defines

#define PANTHEIOS_BE_FILE_F_TRUNCATE   (0x00100000)
 Causes the Pantheios file Stock Back-end to truncate the log file.
#define PANTHEIOS_BE_FILE_F_DISCARD_CACHED_CONTENTS   (0x00200000)
 Causes any log statements cached in the Pantheios file Stock Back-end prior to assignment of the file name (via pantheios_be_file_setFilePath()) to be discarded.
#define PANTHEIOS_BE_FILE_F_SHARE_ON_WINDOWS   (0x00400000)
 By default, logging on Windows takes a write-exclusive lock on the log file.
#define PANTHEIOS_BE_FILE_F_WRITE_WIDE_CONTENTS   (0x00800000)
 By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.
#define PANTHEIOS_BE_FILE_F_WRITE_MULTIBYTE_CONTENTS   (0x00080000)
 By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.
#define PANTHEIOS_BE_FILE_F_DELETE_IF_EMPTY   (0x00040000)
 Specifying this flag causes the log file to be deleted, if and only if it is empty, when it is closed (which occurs during back-end uninitialisation (at program exit), or when another file path is specified, for the given back-end, via pantheios_be_file_setFilePath()).


Define Documentation

#define PANTHEIOS_BE_FILE_F_DELETE_IF_EMPTY   (0x00040000)

Specifying this flag causes the log file to be deleted, if and only if it is empty, when it is closed (which occurs during back-end uninitialisation (at program exit), or when another file path is specified, for the given back-end, via pantheios_be_file_setFilePath()).

If the file cannot be deleted, a bail-out message will be written.

Note:
The current implementation checks the actual file size, as opposed to "remembering" whether any writes were made (by Pantheios).

No attempt will be made to determine whether another program (such as a log viewer) will (be attempting to) use the file; use at your own risk.

Examples:
cpp/backends/example.cpp.backends.file.callback/example.cpp.backends.file.callback.cpp.

#define PANTHEIOS_BE_FILE_F_DISCARD_CACHED_CONTENTS   (0x00200000)

Causes any log statements cached in the Pantheios file Stock Back-end prior to assignment of the file name (via pantheios_be_file_setFilePath()) to be discarded.

#define PANTHEIOS_BE_FILE_F_SHARE_ON_WINDOWS   (0x00400000)

By default, logging on Windows takes a write-exclusive lock on the log file.

Specifying this flag allows multiple processes to write to the same log file. This flag is ignored on UNIX.

#define PANTHEIOS_BE_FILE_F_TRUNCATE   (0x00100000)

Causes the Pantheios file Stock Back-end to truncate the log file.

Note:
If more than one process is using the same file and either, or both, uses this flag, the log file contents cannot be guaranteed to be consistent.
Examples:
c/example.c.N/example.c.N.c, cpp/backends/example.cpp.backends.file.callback/example.cpp.backends.file.callback.cpp, cpp/backends/example.cpp.backends.file.lrsplit/example.cpp.backends.file.lrsplit.cpp, and cpp/backends/example.cpp.backends.file/example.cpp.backends.file.cpp.

#define PANTHEIOS_BE_FILE_F_WRITE_MULTIBYTE_CONTENTS   (0x00080000)

By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.

a Windows' wide string build program will, by default, write characters in wide string encoding. Specifying this flag causes output to be written in multibyte string encoding regardless of the program's encoding.

See also:
PANTHEIOS_BE_FILE_F_WRITE_WIDE_CONTENTS

#define PANTHEIOS_BE_FILE_F_WRITE_WIDE_CONTENTS   (0x00800000)

By default, files are written in wide or multibyte string encoding according to the encoding of the build: e.g.

a Windows' wide string build program will, by default, write characters in wide string encoding. Specifying this flag causes output to be written in widestring encoding regardless of the program's encoding.

See also:
PANTHEIOS_BE_FILE_F_WRITE_MULTIBYTE_CONTENTS


pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo