Skip to content

Commit

Permalink
OrcCommand: UtilitiesMain: print log file value with common parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Feb 11, 2021
1 parent 11c0bbe commit a87bd4d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/OrcCommand/UtilitiesMain.h
Expand Up @@ -45,6 +45,7 @@
#include "Text/Print.h"
#include "Text/Fmt/FILE_NAME.h"
#include "Text/Fmt/FILETIME.h"
#include "Text/Fmt/optional.h"
#include "Text/Fmt/SYSTEMTIME.h"
#include "Text/Fmt/TimeUtc.h"
#include "Utils/Guard.h"
Expand Down Expand Up @@ -474,6 +475,19 @@ class ORCLIB_API UtilitiesMain
PrintValue(root, L"System type", systemType);

PrintValue(root, L"System tags", boost::join(SystemDetails::GetSystemTags(), ", "));

std::wstring logFileName(Text::kEmptyW);
const auto& fileSink = m_logging.fileSink();
if (fileSink)
{
const auto path = fileSink->OutputPath();
if (path)
{
logFileName = *path;
}
}

PrintValue(root, L"Log file", logFileName);
}

template <typename T>
Expand Down Expand Up @@ -950,7 +964,7 @@ class ORCLIB_API UtilitiesMain

return static_cast<int>(Cmd.m_logging.logger().errorCount() + Cmd.m_logging.logger().criticalCount());
}
};
}; // namespace Command

} // namespace Command
} // namespace Orc
Expand Down

0 comments on commit a87bd4d

Please sign in to comment.