CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
logging_internal.h File Reference
#include <cstdarg>
#include <ctime>
#include <string>
#include <vector>
Include dependency graph for logging_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DefaultLogging
 
struct  LogBufferEntry
 

Macros

#define SetLogDebugFile(filename)   ((void)0)
 
#define GetLogDebugFile()   (std::string(""))
 

Enumerations

enum  LogFacilities {
  kLogDebug = 0x01, kLogStdout = 0x02, kLogStderr = 0x04, kLogSyslog = 0x08,
  kLogSyslogWarn = 0x10, kLogSyslogErr = 0x20, kLogCustom0 = 0x40, kLogCustom1 = 0x80,
  kLogCustom2 = 0x100
}
 
enum  LogFlags { kLogNoLinebreak = 0x200, kLogShowSource = 0x400, kLogSensitive = 0x800 }
 
enum  LogLevels {
  kLogLevel0 = 0x01000, kLogNormal = 0x02000, kLogInform = 0x04000, kLogVerbose = 0x08000,
  kLogNone = 0x10000
}
 
enum  LogSource {
  kLogCache = 1, kLogCatalog, kLogSql, kLogCvmfs,
  kLogHash, kLogDownload, kLogCompress, kLogQuota,
  kLogTalk, kLogMonitor, kLogLru, kLogFuse,
  kLogSignature, kLogFsTraversal, kLogCatalogTraversal, kLogNfsMaps,
  kLogPublish, kLogSpooler, kLogConcurrency, kLogUtility,
  kLogGlueBuffer, kLogHistory, kLogUnionFs, kLogPathspec,
  kLogReceiver, kLogUploadS3, kLogUploadGateway, kLogS3Fanout,
  kLogGc, kLogDns, kLogAuthz, kLogReflog,
  kLogKvStore
}
 

Functions

void SetLogSyslogLevel (const int level)
 
int GetLogSyslogLevel ()
 
void SetLogSyslogFacility (const int facility)
 
int GetLogSyslogFacility ()
 
void SetLogCustomFile (unsigned id, const std::string &filename)
 
void SetLogMicroSyslog (const std::string &filename)
 
std::string GetLogMicroSyslog ()
 
void SetLogSyslogPrefix (const std::string &prefix)
 
void SetLogSyslogShowPID (bool flag)
 
void SetLogVerbosity (const LogLevels max_level)
 
void LogShutdown ()
 
void SetAltLogFunc (void(*fn)(const LogSource source, const int mask, const char *msg))
 
std::vector< LogBufferEntryGetLogBuffer ()
 
void ClearLogBuffer ()
 

Variables

const int kLogWarning = kLogStdout | kLogShowSource | kLogNormal
 
const int kLogInfoMsg = kLogStdout | kLogShowSource | kLogInform
 
const int kLogVerboseMsg = kLogStdout | kLogShowSource | kLogVerbose
 

Macro Definition Documentation

#define GetLogDebugFile ( )    (std::string(""))
#define SetLogDebugFile (   filename)    ((void)0)

Enumeration Type Documentation

This file is part of the CernVM File System.

Enumerator
kLogDebug 
kLogStdout 
kLogStderr 
kLogSyslog 
kLogSyslogWarn 
kLogSyslogErr 
kLogCustom0 
kLogCustom1 
kLogCustom2 

Definition at line 19 of file logging_internal.h.

enum LogFlags
Enumerator
kLogNoLinebreak 
kLogShowSource 
kLogSensitive 

Don't add the line to the memory log buffer.

Definition at line 56 of file logging_internal.h.

enum LogLevels
Enumerator
kLogLevel0 
kLogNormal 
kLogInform 
kLogVerbose 
kLogNone 

Definition at line 62 of file logging_internal.h.

enum LogSource

Changes in this enum must be done in logging.cc as well! (see const char *module_names[] = {....})

Enumerator
kLogCache 
kLogCatalog 
kLogSql 
kLogCvmfs 
kLogHash 
kLogDownload 
kLogCompress 
kLogQuota 
kLogTalk 
kLogMonitor 
kLogLru 
kLogFuse 
kLogSignature 
kLogFsTraversal 
kLogCatalogTraversal 
kLogNfsMaps 
kLogPublish 
kLogSpooler 
kLogConcurrency 
kLogUtility 
kLogGlueBuffer 
kLogHistory 
kLogUnionFs 
kLogPathspec 
kLogReceiver 
kLogUploadS3 
kLogUploadGateway 
kLogS3Fanout 
kLogGc 
kLogDns 
kLogAuthz 
kLogReflog 
kLogKvStore 

Definition at line 74 of file logging_internal.h.

Function Documentation

void ClearLogBuffer ( )

Definition at line 528 of file logging.cc.

Here is the call graph for this function:

std::vector<LogBufferEntry> GetLogBuffer ( )

Definition at line 524 of file logging.cc.

Referenced by LogBufferXattr::GetValue().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string GetLogMicroSyslog ( )

Definition at line 303 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), Watchdog::ReportStacktrace(), and Watchdog::Supervise().

Here is the caller graph for this function:

int GetLogSyslogFacility ( )

Definition at line 213 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), AuthzExternalFetcher::Handshake(), and SetLogSyslogShowPID().

Here is the caller graph for this function:

int GetLogSyslogLevel ( )

Definition at line 167 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), and AuthzExternalFetcher::Handshake().

Here is the caller graph for this function:

void LogShutdown ( )

Definition at line 595 of file logging.cc.

Here is the call graph for this function:

void SetAltLogFunc ( void(*)(const LogSource source, const int mask, const char *msg)  fn)

Changes the debug log file from stderr. No effect if DEBUGMSG is undefined.

Definition at line 403 of file logging.cc.

Referenced by cvmfs_set_log_fn(), and download::MainResolveProxyDescription().

Here is the caller graph for this function:

void SetLogCustomFile ( unsigned  id,
const std::string &  filename 
)

Opens a custom log file

Definition at line 544 of file logging.cc.

Referenced by LogShutdown().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogMicroSyslog ( const std::string &  filename)

"Micro-Syslog" write kLogSyslog messages into filename. It rotates this file. Requires for µCernVM

Definition at line 267 of file logging.cc.

Referenced by FuseMain(), LogShutdown(), PosixQuotaManager::MainCacheManager(), loader::loader_talk::MainTalk(), Watchdog::ReportStacktrace(), FileSystem::SetupLogging(), Watchdog::Supervise(), FileSystem::TearDown2ReadOnly(), and FileSystem::~FileSystem().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogSyslogFacility ( const int  local_facility)

Sets the syslog facility to one of local0 .. local7. Falls back to LOG_USER if local_facility is not in [0..7]

Definition at line 182 of file logging.cc.

Referenced by FuseMain(), main(), PosixQuotaManager::MainCacheManager(), and FileSystem::SetupLogging().

Here is the caller graph for this function:

void SetLogSyslogLevel ( const int  level)

Sets the level that is used for all messages to the syslog facility.

Definition at line 150 of file logging.cc.

Referenced by FuseMain(), PosixQuotaManager::MainCacheManager(), and FileSystem::SetupLogging().

Here is the caller graph for this function:

void SetLogSyslogPrefix ( const std::string &  prefix)

The syslog prefix is used to distinguish multiple repositories in /var/log/messages

Definition at line 240 of file logging.cc.

Referenced by FuseMain(), FileSystem::SetupLogging(), and FileSystem::~FileSystem().

Here is the caller graph for this function:

void SetLogSyslogShowPID ( bool  flag)

Definition at line 253 of file logging.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogVerbosity ( const LogLevels  max_level)

Set the maximum verbosity level. By default kLogNormal.

Definition at line 260 of file logging.cc.

Referenced by swissknife::CommandInfo::Main(), swissknife::CommandCheck::Main(), swissknife::CommandPull::Main(), swissknife::CommandCreate::Main(), and swissknife::CommandSync::Main().

Here is the caller graph for this function:

Variable Documentation

const int kLogInfoMsg = kLogStdout | kLogShowSource | kLogInform

Definition at line 111 of file logging_internal.h.

const int kLogVerboseMsg = kLogStdout | kLogShowSource | kLogVerbose

Definition at line 112 of file logging_internal.h.

Referenced by catalog::WritableCatalogManager::AddDirectory(), catalog::WritableCatalog::AddFileChunk(), catalog::WritableCatalogManager::AddHardlinkGroup(), catalog::WritableCatalogManager::Balance(), catalog::WritableCatalogManager::CatalogUploadCallback(), swissknife::CommandTag::CloseAndPublishHistory(), catalog::WritableCatalog::Commit(), catalog::WritableCatalogManager::Commit(), publish::SyncMediator::Commit(), publish::SyncMediator::CompleteHardlinks(), FileSystemTraversal< T >::DoRecursion(), upload::LocalUploader::DoUpload(), catalog::WritableCatalogManager::FinalizeCatalog(), upload::LocalUploader::FinalizeStreamedUpload(), swissknife::CommandCheck::Find(), swissknife::CommandEditTag::GetTagRootHash(), ConcurrentWorkers< WorkerT >::Initialize(), publish::SyncMediator::InsertHardlink(), publish::SyncMediator::InsertLegacyHardlink(), swissknife::CommandPull::Main(), swissknife::CommandApplyDirtab::Main(), swissknife::MainWorker(), MemoryMappedFile::Map(), upload::LocalUploader::Move(), TaskRegister::Process(), publish::SyncUnion::ProcessFile(), publish::SyncMediator::PublishFilesCallback(), publish::SyncMediator::PublishHardlinksCallback(), catalog::WritableCatalogManager::RemoveDirectory(), publish::SyncMediator::RemoveFile(), SigningTool::Run(), ConcurrentWorkers< WorkerT >::RunCallbackThreadWrapper(), ConcurrentWorkers< WorkerT >::RunWorker(), catalog::WritableCatalogManager::SnapshotCatalogs(), catalog::WritableCatalogManager::SnapshotCatalogsSerialized(), upload::LocalUploader::StreamedUpload(), ConcurrentWorkers< WorkerT >::Terminate(), catalog::WritableCatalogManager::TouchDirectory(), catalog::WritableCatalog::Transaction(), publish::SyncUnionAufs::Traverse(), publish::SyncUnionOverlayfs::Traverse(), MemoryMappedFile::Unmap(), swissknife::CommandTag::UpdateUndoTags(), swissknife::CommandTag::UploadCatalogAndUpdateManifest(), and ConcurrentWorkers< WorkerT >::WaitForEmptyQueue().