|
MagickCore 7.0.10
|
#include "wizard/studio.h"#include "wizard/blob.h"#include "wizard/client.h"#include "wizard/configure.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/hashmap.h"#include "wizard/log.h"#include "wizard/memory_.h"#include "wizard/option.h"#include "wizard/semaphore.h"#include "wizard/string_.h"#include "wizard/string-private.h"#include "wizard/thread_.h"#include "wizard/thread-private.h"#include "wizard/timer.h"#include "wizard/token.h"#include "wizard/utility.h"#include "wizard/utility-private.h"#include "wizard/version.h"#include "wizard/xml-tree.h"#include "wizard/xml-tree-private.h"Go to the source code of this file.
Data Structures | |
| struct | _EventInfo |
| struct | _HandlerInfo |
| struct | _LogInfo |
| struct | _LogMapInfo |
Macros | |
| #define | LogFilename "log.xml" |
| #define | MegabytesToBytes(value) ((WizardSizeType) (value)*1024*1024) |
Typedefs | |
| typedef struct _EventInfo | EventInfo |
| typedef struct _HandlerInfo | HandlerInfo |
| typedef struct _LogMapInfo | LogMapInfo |
Enumerations | |
| enum | LogHandlerType { UndefinedHandler = 0x0000 , NoHandler = 0x0000 , ConsoleHandler = 0x0001 , StdoutHandler = 0x0002 , StderrHandler = 0x0004 , FileHandler = 0x0008 , DebugHandler = 0x0010 , EventHandler = 0x0020 } |
Functions | |
| static LogHandlerType | ParseLogHandlers (const char *) |
| static WizardBooleanType | IsLogCacheInstantiated (ExceptionInfo *) |
| static WizardBooleanType | LoadLogCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *) |
| static LinkedListInfo * | AcquireLogCache (const char *filename, ExceptionInfo *exception) |
| WizardExport void | CloseWizardLog (void) |
| WizardExport const LogInfo * | GetLogInfo (const char *name, ExceptionInfo *exception) |
| static int | LogInfoCompare (const void *x, const void *y) |
| WizardExport const LogInfo ** | GetLogInfoList (const char *pattern, size_t *number_preferences, ExceptionInfo *exception) |
| static int | LogCompare (const void *x, const void *y) |
| WizardExport char ** | GetLogList (const char *pattern, size_t *number_preferences, ExceptionInfo *exception) |
| WizardExport const char * | GetLogName (void) |
| WizardExport WizardBooleanType | IsEventLogging (void) |
| WizardExport WizardBooleanType | ListLogInfo (FILE *file, ExceptionInfo *exception) |
| WizardExport WizardBooleanType | LogComponentGenesis (void) |
| static void * | DestroyLogElement (void *log_info) |
| WizardExport void | LogComponentTerminus (void) |
| static char * | TranslateEvent (const LogEventType wizard_unused(type), const char *module, const char *function, const size_t line, const char *domain, const char *event) |
| static char * | TranslateFilename (const LogInfo *log_info) |
| WizardBooleanType | LogWizardEventList (const LogEventType type, const char *module, const char *function, const size_t line, const char *format, va_list operands) |
| WizardBooleanType | LogWizardEvent (const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...) |
| WizardExport LogEventType | SetLogEventMask (const char *events) |
| WizardExport void | SetLogFormat (const char *format) |
| WizardExport const char * | SetLogName (const char *name) |
Variables | |
| static const HandlerInfo | LogHandlers [32] |
| static const LogMapInfo | LogMap [] |
| static char | log_name [WizardPathExtent] = "Wizard" |
| static LinkedListInfo * | log_cache = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | log_semaphore = (SemaphoreInfo *) NULL |
| #define MegabytesToBytes | ( | value | ) | ((WizardSizeType) (value)*1024*1024) |
| typedef struct _EventInfo EventInfo |
| typedef struct _HandlerInfo HandlerInfo |
| typedef struct _LogMapInfo LogMapInfo |
| enum LogHandlerType |
|
static |
Definition at line 250 of file log.c.
References AcquireTimerInfo(), AcquireWizardMemory(), AppendValueToLinkedList(), ConstantString(), DestroyConfigureOptions(), _LogInfo::event_mask, _LogMapInfo::event_mask, _LogInfo::filename, _LogMapInfo::filename, _LogInfo::format, _LogMapInfo::format, GetConfigureOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), GetWizardModule, _LogInfo::handler_mask, _LogMapInfo::handler_mask, LoadLogCache(), log_cache, LogMap, _LogInfo::name, NewLinkedList(), _LogInfo::path, ResourceError, ResourceFatalError, _LogInfo::signature, ThrowFatalException, ThrowWizardException(), _LogInfo::timer, WizardFalse, WizardSignature, and WizardTrue.
Referenced by IsLogCacheInstantiated().
| WizardExport void CloseWizardLog | ( | void | ) |
Definition at line 338 of file log.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), _LogInfo::file, GetLogInfo(), IsEventLogging(), LockSemaphoreInfo(), log_semaphore, UnlockSemaphoreInfo(), and WizardFalse.
|
static |
Definition at line 856 of file log.c.
References DestroyString(), DestroyTimerInfo(), _LogInfo::event_semaphore, _LogInfo::file, _LogInfo::filename, _LogInfo::format, _LogInfo::path, RelinquishSemaphoreInfo(), RelinquishWizardMemory(), and _LogInfo::timer.
Referenced by LogComponentTerminus().
| WizardExport const LogInfo * GetLogInfo | ( | const char * | name, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 386 of file log.c.
References GetNextValueInLinkedList(), GetWizardModule, InsertValueInLinkedList(), IsLogCacheInstantiated(), LocaleCompare(), LockSemaphoreInfo(), log_cache, log_semaphore, _LogInfo::name, OptionWarning, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), ThrowWizardException(), UnlockSemaphoreInfo(), and WizardFalse.
Referenced by CloseWizardLog(), GetLogInfoList(), GetLogList(), IsEventLogging(), LogComponentGenesis(), LogWizardEventList(), SetLogEventMask(), SetLogFormat(), and TranslateEvent().
| WizardExport const LogInfo ** GetLogInfoList | ( | const char * | pattern, |
| size_t * | number_preferences, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 470 of file log.c.
References AcquireQuantumMemory(), GetLogInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetWizardModule, GlobExpression(), LockSemaphoreInfo(), log_cache, log_semaphore, LogInfoCompare(), LogWizardEvent(), _LogInfo::name, ResetLinkedListIterator(), _LogInfo::stealth, TraceEvent, UnlockSemaphoreInfo(), and WizardFalse.
Referenced by ListLogInfo().
| WizardExport char ** GetLogList | ( | const char * | pattern, |
| size_t * | number_preferences, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 563 of file log.c.
References AcquireQuantumMemory(), ConstantString(), GetLogInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetWizardModule, GlobExpression(), LockSemaphoreInfo(), log_cache, log_semaphore, LogCompare(), LogWizardEvent(), _LogInfo::name, ResetLinkedListIterator(), _LogInfo::stealth, TraceEvent, UnlockSemaphoreInfo(), and WizardFalse.
| WizardExport const char * GetLogName | ( | void | ) |
Definition at line 627 of file log.c.
References log_name.
Referenced by TranslateEvent(), and TranslateFilename().
| WizardExport WizardBooleanType IsEventLogging | ( | void | ) |
Definition at line 688 of file log.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), _LogInfo::event_mask, GetLogInfo(), IsLinkedListEmpty(), log_cache, NoEvents, WizardFalse, and WizardTrue.
Referenced by AddChildToXMLTree(), CloseWizardLog(), GetBlobInfo(), LogWizardEventList(), NewSplayTree(), NewXMLTreeTag(), and WizardsToolkitGenesis().
|
static |
Definition at line 655 of file log.c.
References AcquireLogCache(), ActivateSemaphoreInfo(), LockSemaphoreInfo(), log_cache, log_semaphore, LogFilename, UnlockSemaphoreInfo(), WizardFalse, and WizardTrue.
Referenced by GetLogInfo().
| WizardExport WizardBooleanType ListLogInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 728 of file log.c.
References FormatLocaleFile(), _LogInfo::generations, GetLogInfoList(), _LogInfo::limit, LocaleCompare(), LogHandlers, _LogInfo::path, RelinquishWizardMemory(), WizardFalse, and WizardTrue.
| static WizardBooleanType LoadLogCache | ( | LinkedListInfo * | log_cache, |
| const char * | xml, | ||
| const char * | filename, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1435 of file log.c.
References AcquireString(), AcquireTimerInfo(), AcquireWizardMemory(), AppendValueToLinkedList(), ConcatenateWizardString(), ConfigureError, ConstantString(), CopyWizardString(), DestroyString(), DirectorySeparator, _LogInfo::event_mask, _LogInfo::filename, FileToXML(), _LogInfo::format, _LogInfo::generations, GetNextToken(), GetPathComponent(), GetWizardModule, _LogInfo::handler_mask, HeadPath, _LogInfo::limit, LoadLogCache(), LocaleCompare(), LocaleNCompare(), log_cache, ParseLogHandlers(), ParseWizardOption(), _LogInfo::path, RelinquishWizardMemory(), ResourceError, ResourceFatalError, _LogInfo::signature, StringToUnsignedLong(), ThrowFatalException, ThrowWizardException(), _LogInfo::timer, WizardFalse, WizardLogEventOptions, WizardPathExtent, WizardSignature, and WizardTrue.
Referenced by AcquireLogCache(), and LoadLogCache().
|
static |
| WizardExport WizardBooleanType LogComponentGenesis | ( | void | ) |
Definition at line 824 of file log.c.
References AcquireExceptionInfo(), AcquireSemaphoreInfo(), DestroyExceptionInfo(), GetLogInfo(), log_semaphore, and WizardTrue.
Referenced by WizardsToolkitGenesis().
| WizardExport void LogComponentTerminus | ( | void | ) |
Definition at line 882 of file log.c.
References ActivateSemaphoreInfo(), DestroyLinkedList(), DestroyLogElement(), LockSemaphoreInfo(), log_cache, log_semaphore, RelinquishSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by WizardsToolkitTerminus().
|
static |
| WizardBooleanType LogWizardEvent | ( | const LogEventType | type, |
| const char * | module, | ||
| const char * | function, | ||
| const size_t | line, | ||
| const char * | format, | ||
| ... | |||
| ) |
Definition at line 1390 of file log.c.
References LogWizardEventList().
Referenced by AcquireFileInfo(), AcquireFileLock(), AcquireUniqueFileResource(), AcquireWizardResource(), AddPathToXMLTree(), AppendFileExtension(), AttachBlob(), AuthenticateKey(), AuthenticateSecretKey(), Base64Decode(), Base64Encode(), CloneSplayTree(), CloseBlob(), ConstructHMAC(), DecipherCBCMode(), DecipherCFBMode(), DecipherCipher(), DecipherCTRMode(), DecipherECBMode(), DecipherOFBMode(), DeleteNodeByValueFromSplayTree(), DeleteNodeFromSplayTree(), DestroyAESInfo(), DestroyAuthenticateInfo(), DestroyBlob(), DestroyBZIPInfo(), DestroyChachaInfo(), DestroyCipherInfo(), DestroyCRC64Info(), DestroyEntropyInfo(), DestroyFileInfo(), DestroyHashInfo(), DestroyHMACInfo(), DestroyKeyInfo(), DestroyKeyringInfo(), DestroyLocaleOptions(), DestroyLZMAInfo(), DestroyMD5Info(), DestroyRandomInfo(), DestroySecretInfo(), DestroySerpentInfo(), DestroySHA1Info(), DestroySHA2224Info(), DestroySHA2256Info(), DestroySHA2384Info(), DestroySHA2512Info(), DestroySHA3Info(), DestroyTwofishInfo(), DestroyXMLTree(), DestroyZIPInfo(), DetachBlob(), EncipherCBCMode(), EncipherCFBMode(), EncipherCipher(), EncipherCTRMode(), EncipherECBMode(), EncipherOFBMode(), EOFBlob(), ExportKeyringKey(), FileToBlob(), FileToString(), FileToStringInfo(), FinalizeCRC64(), FinalizeHash(), FinalizeHMAC(), FinalizeMD5(), FinalizeSHA1(), FinalizeSHA2224(), FinalizeSHA2256(), FinalizeSHA2384(), FinalizeSHA2512(), FinalizeSHA3(), GenerateAuthenticateKey(), GenerateCipherNonce(), GenerateSecretKey(), GenerateSessionKey(), GetAESBlocksize(), GetAuthenticateId(), GetAuthenticateKey(), GetAuthenticateKeyLength(), GetAuthenticatePassphrase(), GetBlobFilename(), GetBlobProperties(), GetBlobSize(), GetBZIPChaos(), GetChachaBlocksize(), GetCipherBlocksize(), GetCipherNonce(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetConfigurePaths(), GetConfigureValue(), GetCRC64Blocksize(), GetCRC64CyclicRedundancyCheck(), GetCRC64Digest(), GetCRC64Digestsize(), GetEntropyChaos(), GetEntropyFromReservoir(), GetFileDescriptor(), GetFilePath(), GetFileProperties(), GetHashBlocksize(), GetHashDigest(), GetHashDigestsize(), GetHashHexDigest(), GetHMACDigest(), GetHMACDigestsize(), GetKeyInfo(), GetKeyringKey(), GetKeyringNonce(), GetLocaleInfoList(), GetLocaleList(), GetLocaleOptions(), GetLocaleValue(), GetLogInfoList(), GetLogList(), GetLZMAChaos(), GetMD5Blocksize(), GetMD5Digest(), GetMD5Digestsize(), GetMimeDescription(), GetMimeInfoList(), GetMimeList(), GetMimeType(), GetNextKeyInSplayTree(), GetNextValueInSplayTree(), GetNextXMLTreeTag(), GetNumberOfNodesInSplayTree(), GetPathComponent(), GetSecretId(), GetSecretKey(), GetSecretKeyLength(), GetSecretPassphrase(), GetSerpentBlocksize(), GetSHA1Blocksize(), GetSHA1Digest(), GetSHA1Digestsize(), GetSHA2224Blocksize(), GetSHA2224Digest(), GetSHA2224Digestsize(), GetSHA2256Blocksize(), GetSHA2256Digest(), GetSHA2256Digestsize(), GetSHA2384Blocksize(), GetSHA2384Digest(), GetSHA2384Digestsize(), GetSHA2512Blocksize(), GetSHA2512Digest(), GetSHA2512Digestsize(), GetSHA3Blocksize(), GetSHA3Digest(), GetSHA3Digestsize(), GetTwofishBlocksize(), GetValueFromSplayTree(), GetXMLTreeAttribute(), GetXMLTreeAttributes(), GetXMLTreeChild(), GetXMLTreeContent(), GetXMLTreeOrdered(), GetXMLTreePath(), GetXMLTreeProcessingInstructions(), GetXMLTreeSibling(), GetXMLTreeTag(), GetZIPChaos(), ImportKeyringKey(), IncreaseBZIP(), IncreaseEntropy(), IncreaseLZMA(), IncreaseZIP(), InitializeCRC64(), InitializeHash(), InitializeHMAC(), InitializeMD5(), InitializeSHA1(), InitializeSHA2224(), InitializeSHA2256(), InitializeSHA2384(), InitializeSHA2512(), InitializeSHA3(), LoadConfigureCache(), LoadLocaleCache(), LoadMimeCache(), OpenBlob(), PrintKeyringProperties(), PruneTagFromXMLTree(), ReadFileChunk(), RegisterWizardSignalHandler(), RelinquishUniqueFileResource(), RelinquishWizardResource(), RemoveNodeByValueFromSplayTree(), RemoveNodeFromSplayTree(), ResetCipherNonce(), ResetHMAC(), ResetSplayTree(), ResetSplayTreeIterator(), RestoreBZIP(), RestoreEntropy(), RestoreLZMA(), RestoreZIP(), SaveEntropyToReservoir(), SetAESKey(), SetAuthenticateId(), SetAuthenticateKeyLength(), SetAuthenticatePassphrase(), SetChachaKey(), SetCipherKey(), SetCipherNonce(), SetKeyInfo(), SetSecretKeyLength(), SetSerpentKey(), SetTwofishKey(), SetXMLTreeAttribute(), SetXMLTreeContent(), SyncBlob(), TellBlob(), ThrowWizardExceptionList(), UpdateCRC64(), UpdateHash(), UpdateHMAC(), WriteFile32Bits(), WriteFile64Bits(), WriteFileChunk(), and XMLTreeInfoToXML().
| WizardBooleanType LogWizardEventList | ( | const LogEventType | type, |
| const char * | module, | ||
| const char * | function, | ||
| const size_t | line, | ||
| const char * | format, | ||
| va_list | operands | ||
| ) |
Definition at line 1265 of file log.c.
References AcquireExceptionInfo(), ActivateSemaphoreInfo(), _LogInfo::append, ConsoleHandler, ContinueTimer(), DebugHandler, DestroyExceptionInfo(), _LogInfo::event_mask, _LogInfo::event_semaphore, EventHandler, _LogInfo::file, FileHandler, fopen_utf8(), _LogInfo::generation, GetLogInfo(), _LogInfo::handler_mask, IsEventLogging(), IsPathAcessible(), _LogInfo::limit, LockSemaphoreInfo(), RelinquishWizardMemory(), StderrHandler, StdoutHandler, _LogInfo::timer, TranslateEvent(), TranslateFilename(), UnlockSemaphoreInfo(), WizardFalse, WizardLogEventOptions, WizardOptionToMnemonic(), WizardPathExtent, and WizardTrue.
Referenced by LogWizardEvent().
|
static |
Definition at line 1672 of file log.c.
References LocaleNCompare(), LogHandlers, _HandlerInfo::name, NoHandler, and UndefinedHandler.
Referenced by LoadLogCache().
| WizardExport LogEventType SetLogEventMask | ( | const char * | events | ) |
Definition at line 1731 of file log.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), _LogInfo::event_mask, GetLogInfo(), GetValueFromLinkedList(), LockSemaphoreInfo(), log_cache, log_semaphore, ParseWizardOption(), UndefinedEvents, UnlockSemaphoreInfo(), WizardLogEventOptions, and WizardTrue.
Referenced by WizardsToolkitGenesis().
| WizardExport void SetLogFormat | ( | const char * | format | ) |
Definition at line 1777 of file log.c.
References AcquireExceptionInfo(), ConstantString(), DestroyExceptionInfo(), DestroyString(), _LogInfo::format, GetLogInfo(), LockSemaphoreInfo(), log_semaphore, and UnlockSemaphoreInfo().
| WizardExport const char * SetLogName | ( | const char * | name | ) |
Definition at line 1819 of file log.c.
References CopyWizardString(), log_name, and WizardPathExtent.
|
static |
Definition at line 926 of file log.c.
References AcquireExceptionInfo(), AcquireString(), CopyWizardString(), DestroyExceptionInfo(), DirectorySeparator, _LogInfo::format, FormatLocaleString(), FormatWizardTime(), _LogInfo::generation, _LogInfo::generations, GetClientName(), GetElapsedTime(), GetLogInfo(), GetLogName(), GetUserTime(), GetWizardThreadSignature(), LocaleCompare(), ResizeQuantumMemory(), _LogInfo::timer, WizardLibVersionText, and WizardPathExtent.
Referenced by LogWizardEventList().
|
static |
Definition at line 1162 of file log.c.
References AcquireString(), CopyWizardString(), _LogInfo::filename, FormatLocaleString(), _LogInfo::generation, _LogInfo::generations, GetClientName(), GetLogName(), ResizeQuantumMemory(), WizardLibVersionText, and WizardPathExtent.
Referenced by LogWizardEventList().
|
static |
Definition at line 208 of file log.c.
Referenced by AcquireLogCache(), GetLogInfo(), GetLogInfoList(), GetLogList(), IsEventLogging(), IsLogCacheInstantiated(), LoadLogCache(), LogComponentTerminus(), and SetLogEventMask().
|
static |
Definition at line 205 of file log.c.
Referenced by GetLogName(), and SetLogName().
|
static |
Definition at line 211 of file log.c.
Referenced by CloseWizardLog(), GetLogInfo(), GetLogInfoList(), GetLogList(), IsLogCacheInstantiated(), LogComponentGenesis(), LogComponentTerminus(), SetLogEventMask(), and SetLogFormat().
|
static |
Definition at line 145 of file log.c.
Referenced by ListLogInfo(), and ParseLogHandlers().
|
static |
Definition at line 198 of file log.c.
Referenced by AcquireLogCache().