log_ivdfs Class Reference
[G_new_group]

#include <log_ivdfs.h>

Inheritance diagram for log_ivdfs:

Inheritance graph
[legend]
Collaboration diagram for log_ivdfs:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 30 of file log_ivdfs.h.


Public Member Functions

 log_ivdfs ()
 log_ivdfs (const string &a_partName)
void Init (const string &a_partName)
void Write (ivd_FileID_t a_fileID, UInt64_t a_migID, const string &a_path, const char *a_msg)
void Write (ivd_GenInode_t a_inode, ivd_FileID_t a_fileID, UInt64_t a_migID, const string &a_newPath, const string &a_oldPath, hsm_ChgFlag_t a_chgFlags)
void Write (ivd_GenInode_t a_inode, ivd_FileID_t a_fileID, UInt32_t a_hsmJobID, const string &a_path, const char *a_msg)

Private Attributes

const string m_partName
cmn_Mutex m_fsLogOut_x

Constructor & Destructor Documentation

log_ivdfs::log_ivdfs (  )  [inline]

Definition at line 32 of file log_ivdfs.h.

00032 {};

log_ivdfs::log_ivdfs ( const string &  a_partName  )  [inline]

Definition at line 34 of file log_ivdfs.h.

00034                                         {
00035         Init(a_partName);
00036     };


Member Function Documentation

void log_ivdfs::Init ( const string &  a_partName  ) 

Definition at line 36 of file log_ivdfs.cpp.

References cmn_Global::dirs, g_cmn, ivd_Directories::log, and log_File::SetFileName().

Referenced by i_FSC_i::i_FSC_i(), and main().

00036                                              {
00037     SetFileName(g_cmn.dirs.log + (string("hsmfs_") + a_partName + string(".log")));
00038 }

Here is the call graph for this function:

Here is the caller graph for this function:

void log_ivdfs::Write ( ivd_FileID_t  a_fileID,
UInt64_t  a_migID,
const string &  a_path,
const char *  a_msg 
)

Definition at line 41 of file log_ivdfs.cpp.

References m_fsLogOut_x, and log_File::WriteF().

Referenced by hsm_FileHeader::Event(), hsm_FileHeader::MigrationIsDone(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), and fsc_DataL::Write2DB().

00044                                          {
00045 
00046     cmn_MutexLock l (m_fsLogOut_x);
00047 
00048     ostringstream sstr;
00049     sstr << "[" << cmn_Time().Time2YMDhms() << ", " << a_fileID;
00050     if (a_migID) {
00051         sstr << ":" << a_migID;
00052     }
00053     
00054     // File names are written in UTF-8: No conversion is done.
00055     sstr << ", \"" << a_path.c_str() << "\"] " << a_msg << endl;
00056     
00057     WriteF(sstr.str().data(), ivd_FileBufSize_t(sstr.str().length()) );
00058 }

Here is the call graph for this function:

Here is the caller graph for this function:

void log_ivdfs::Write ( ivd_GenInode_t  a_inode,
ivd_FileID_t  a_fileID,
UInt64_t  a_migID,
const string &  a_newPath,
const string &  a_oldPath,
hsm_ChgFlag_t  a_chgFlags 
)

Definition at line 61 of file log_ivdfs.cpp.

References CHG_ATTR_d, CHG_CHGSTREAM_d, CHG_CREATE_d, CHG_DELETED_d, CHG_NAMEOWN_d, IVD_PRINT_ID_FS, m_fsLogOut_x, and log_File::WriteF().

00066                                                  {
00067 
00068     cmn_MutexLock l (m_fsLogOut_x);
00069 
00070     string msg;
00071     if (a_chgFlags & CHG_CREATE_d) {
00072         msg = "Added.";
00073     }
00074     else if (a_chgFlags & CHG_DELETED_d) {
00075         msg = "Deleted.";
00076     }
00077     else if (a_chgFlags & CHG_CHGSTREAM_d) {
00078         msg = "Changed.";
00079     }
00080     else if (a_chgFlags & CHG_ATTR_d) {
00081         msg = "AttrChanged.";
00082     }
00083     else if (a_chgFlags & CHG_NAMEOWN_d) {
00084         msg = "Moved/Renamed.";
00085     }
00086 
00087     ostringstream sstr;
00088     sstr << "[" << cmn_Time().Time2YMDhms() 
00089             << ", " << IVD_PRINT_ID_FS(a_inode)
00090             << ", " << a_fileID;
00091     if (a_migID) {
00092         sstr << ":" << a_migID;
00093     }
00094     
00095     sstr << ", \"" << a_newPath.c_str()
00096          << "\", \"" << a_oldPath.c_str() << "\"] " << msg << endl;
00097          
00098     WriteF(sstr.str().data(), ivd_FileBufSize_t(sstr.str().length()) );
00099 }

Here is the call graph for this function:

void log_ivdfs::Write ( ivd_GenInode_t  a_inode,
ivd_FileID_t  a_fileID,
UInt32_t  a_hsmJobID,
const string &  a_path,
const char *  a_msg 
)

Definition at line 102 of file log_ivdfs.cpp.

References IVD_PRINT_ID_FS, m_fsLogOut_x, and log_File::WriteF().

00106                                          {
00107 
00108     cmn_MutexLock l (m_fsLogOut_x);
00109 
00110     ostringstream sstr;
00111     sstr << "[" << cmn_Time().Time2YMDhms() 
00112             << ", " << IVD_PRINT_ID_FS(a_inode)
00113             << ", " << a_fileID
00114             << ", " << a_hsmJobID;
00115     
00116     sstr << ", \"" << a_path.c_str() << "\"] " << a_msg << endl;
00117          
00118     WriteF(sstr.str().data(), ivd_FileBufSize_t(sstr.str().length()) );
00119 }

Here is the call graph for this function:


Member Data Documentation

const string log_ivdfs::m_partName [private]

Definition at line 58 of file log_ivdfs.h.

Definition at line 59 of file log_ivdfs.h.

Referenced by Write().


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:43:01 2012 for OPENARCHIVE by  doxygen 1.5.6