This repository was archived by the owner on Oct 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
33using System . Linq ;
4- using UnturnedMapMergeTool . Models ;
54using UnturnedMapMergeTool . Models . Enums ;
65using UnturnedMapMergeTool . Unturned . Unity ;
76
Original file line number Diff line number Diff line change @@ -15,8 +15,11 @@ private static void Main(string[] args)
1515 {
1616 Log . Logger = new LoggerConfiguration ( )
1717 . WriteTo . Console ( )
18+ . WriteTo . File ( "log.txt" )
1819 . CreateLogger ( ) ;
1920
21+ Log . Information ( $ "UnturnedMapMergeTool v{ typeof ( Program ) . Assembly . GetName ( ) . Version } has been loaded!") ;
22+
2023 Config config ;
2124 if ( File . Exists ( "config.json" ) )
2225 {
@@ -110,6 +113,8 @@ private static void Main(string[] args)
110113 itemsDataMergeTool . CombineAndSaveData ( outputMap ) ;
111114 jarsDataMergeTool . CombineAndSaveData ( outputMap ) ;
112115
116+ Log . Information ( $ "Finished migrating { config . Maps . Count } maps!") ;
117+ Log . Information ( "Press any key to exit the program..." ) ;
113118 Console . ReadKey ( ) ;
114119 }
115120}
Original file line number Diff line number Diff line change 1- using System ;
1+ using Serilog ;
22using UnturnedMapMergeTool . Models . Enums ;
33
44namespace UnturnedMapMergeTool . Services
@@ -7,12 +7,12 @@ public partial class CopyMap
77 {
88 private void LogTile ( ETileType tileType , string message )
99 {
10- Log ( $ "[{ tileType } ] { message } ") ;
10+ LogInformation ( $ "[{ tileType } ] { message } ") ;
1111 }
1212
13- private void Log ( string message )
13+ private void LogInformation ( string message )
1414 {
15- Console . WriteLine ( $ "[{ config . Name } ]: { message } ") ;
15+ Log . Information ( $ "[{ config . Name } ]: { message } ") ;
1616 }
1717 }
1818}
Original file line number Diff line number Diff line change 99 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" />
1010 <PackageReference Include =" Serilog" Version =" 2.12.0" />
1111 <PackageReference Include =" Serilog.Sinks.Console" Version =" 4.1.0" />
12+ <PackageReference Include =" Serilog.Sinks.File" Version =" 5.0.0" />
1213 </ItemGroup >
1314
1415 <ItemGroup >
You can’t perform that action at this time.
0 commit comments