Skip to content

Commit

Permalink
Simplify logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rsjaffe committed Jan 11, 2022
1 parent 0e2e354 commit a774d16
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions src/application/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,31 +142,12 @@ void rsj::Log(const juce::String& info, const std::source_location& location) no

void rsj::Log(gsl::czstring<> info, const std::source_location& location) noexcept
{
try {
if (juce::Logger::getCurrentLogger()) {
juce::String localname {location.file_name()};
localname = localname.substring(localname.lastIndexOfChar('\\') + 1);
juce::Logger::writeToLog(juce::Time::getCurrentTime().toISO8601(true) + ' ' + localname
+ '(' + juce::String(location.line()) + ") "
+ juce::String::fromUTF8(info));
}
}
catch (...) { //-V565 //-V5002
}
rsj::Log(juce::String::fromUTF8(info), location);
}

void rsj::Log(gsl::cwzstring<> info, const std::source_location& location) noexcept
{
try {
if (juce::Logger::getCurrentLogger()) {
juce::String localname {location.file_name()};
localname = localname.substring(localname.lastIndexOfChar('\\') + 1);
juce::Logger::writeToLog(juce::Time::getCurrentTime().toISO8601(true) + ' ' + localname
+ '(' + juce::String(location.line()) + ") " + info);
}
}
catch (...) { //-V565 //-V5002
}
rsj::Log(juce::String(info), location);
}

void rsj::LogAndAlertError(
Expand Down

0 comments on commit a774d16

Please sign in to comment.