Adjustments to logger

This commit is contained in:
2024-12-31 02:07:30 -05:00
parent ddca5e8668
commit b54d336193
10 changed files with 81 additions and 39 deletions

View File

@ -12,7 +12,7 @@ file_copy_sync :: proc( path_src, path_dst: string, allocator := context.allocat
{
path_info, result := file_status( path_src, allocator )
if result != os.ERROR_NONE {
logf("Could not get file info: %v", result, LogLevel.Error )
log_fmt("Could not get file info: %v", result, LogLevel.Error )
return false
}
file_size = path_info.size
@ -20,14 +20,14 @@ file_copy_sync :: proc( path_src, path_dst: string, allocator := context.allocat
src_content, result := os.read_entire_file( path_src, allocator )
if ! result {
logf( "Failed to read file to copy: %v", path_src, LogLevel.Error )
log_fmt( "Failed to read file to copy: %v", path_src, LogLevel.Error )
runtime.debug_trap()
return false
}
result = os.write_entire_file( path_dst, src_content, false )
if ! result {
logf( "Failed to copy file: %v", path_dst, LogLevel.Error )
log_fmt( "Failed to copy file: %v", path_dst, LogLevel.Error )
runtime.debug_trap()
return false
}