Skip to content

Commit

Permalink
Merge pull request #11691 from uklotzde/export-track-metadata-log
Browse files Browse the repository at this point in the history
Log export of track metadata into file
  • Loading branch information
daschuer committed Jun 30, 2023
2 parents 72f545f + 7c57e55 commit fff7a55
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/sources/metadatasourcetaglib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,12 +904,10 @@ class SafelyWritableFile final {
std::pair<MetadataSource::ExportResult, QDateTime>
MetadataSourceTagLib::exportTrackMetadata(
const TrackMetadata& trackMetadata) const {
// NOTE(uklotzde): Log unconditionally (with debug level) to
// identify files in the log file that might have caused a
// crash while exporting metadata.
kLogger.debug() << "Exporting track metadata"
<< "into file" << m_fileName
<< "with type" << m_fileType;
// Modifying an external file is a potentially dangerous operation.
// If this operation unexpectedly crashes or corrupts data we need
// to identify the file that is affected.
kLogger.info() << "Exporting track metadata into file:" << m_fileName;

SafelyWritableFile safelyWritableFile(m_fileName, kExportTrackMetadataIntoTemporaryFile);
if (!safelyWritableFile.isReady()) {
Expand Down

0 comments on commit fff7a55

Please sign in to comment.