kianzarrin / AdaptiveNetworks

MIT License
7 stars 4 forks source link

Huge Log #22

Closed UlfVinr closed 2 years ago

UlfVinr commented 2 years ago

This is more of a question than a problem (I hope) but is an AdaptiveRoads.log file of around 500 MB (532,459 KB to be exact) normal or to be expected? That's how big mine is, with a total of 5,101,328 lines (mostly [Debug] it looks like, but also [Info]) with a cumulative (??) time of 6,076,267ms, or about 101 minutes if I'm reading that correctly.

It starts with:

[Info] 21,236ms | Log file at C:/Program Files (x86)/Steam/steamapps/common/Cities_Skylines/Cities_Data\Logs\AdaptiveRoads.log now=7/30/2022 4:38:10 AM [Info] 21,237ms | AdaptiveRoads Version:3.8.6.17620 Commit:7604473 CommitDate:2022-07-03T21:38:09+03:00 [Debug] 21,237ms | Testing StackTrace: at AdaptiveRoads.LifeCycle.LifeCycle.Enable() at AdaptiveRoads.LifeCycle.UserMod.OnEnabled() at System.Reflection.MonoMethod.InternalInvoke(System.Object , System.Object[] , System.Exception ByRef ) at System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) at System.Reflection.MethodBase.Invoke(System.Object obj, System.Object[] parameters) at ColossalFramework.Plugins.PluginManager.AddPlugins(System.Collections.Generic.Dictionary`2 plugins) at ColossalFramework.Plugins.PluginManager.LoadPlugins() at Starter.Awake() [Info] 21,238ms | Found plug-in:Adaptive Networks 3.8 [Info] 21,239ms | Initializing Log.FlushTread [Info] 21,241ms | LifeCycle.HotReload3rdparty() called. ... [Info] 22,134ms | LifeCycle.HotReload3rdparty() called. [Info] 31,026ms | option Verbose log is False [Info] 31,027ms | option Buffered log is True [Info] 85,435ms | LifeCycle.HotReload3rdparty() called. [Info] 87,115ms | option Verbose log is False [Info] 87,116ms | option Buffered log is True [Info] 274,321ms | LifeCycle.Preload() called

Then lists my mods. AdaptiveRoads.Patches seem to be applied, then Harmony. AssetDataExtension.OnAssetLoadedImpl is called for all kinds of things. Net Metadata is restored for a number of things. As an example:

AssetDataExtension.OnAssetLoadedImpl(): extracted data for AdvancedRoadEditor_NetInfoExt [Info] 304,267ms | AssetData.Load(AdaptiveRoads.Manager.AssetData, 1889660581.Double Steel Barrier - raisable_Data (NetInfo)) called. [Info] 304,268ms | NetInfoExtionsion.EnsureExtended(1889660581.Double Steel Barrier - raisable_Data (NetInfo), False) called. [Debug] 304,269ms | EnsureExtended(1889660581.Double Steel Barrier - raisable_Data (NetInfo)): successful [Info] 304,269ms | Net.Recalculate(1889660581.Double Steel Barrier - raisable_Data (NetInfo)) called. [Info] 304,269ms | Net.RefreshLevelOfDetail() called. [Info] 304,269ms | Net.RecalculateConnectGroups() called. [Info] 304,269ms | Net.OptimizeUserData() called. [Info] 304,269ms | Segment.OptimizeUserData() called. [Debug] 304,269ms | Net Metadata restored.

The vast majority of entries are similar to these:

[Debug] 780,088ms | mark node:162 info:Pedestrian Gravel (NetInfo) update-level=-1 from segment:0 [Debug] 780,089ms | mark segment:22878 info:Pedestrian Gravel (NetInfo) update-level=0 from node:162 [Debug] 780,089ms | mark node:16628 info:Pedestrian Gravel (NetInfo) update-level=1 from segment:22878 [Debug] 780,089ms | mark node:16628 info:Pedestrian Gravel (NetInfo) update-level=-1 from segment:0

There doesn't appear to be any real errors or problems, and as I had just started a new game I can see an initial index or something being created right from the start which can be very long.

But is a log file half a gigabyte big expected behavior? Thanks! (Log file can be provided if needed.)

chameleon-tbn commented 2 years ago

If i See it correct, you are subscribed to the Alpha version, or? If so: yes expected as we need a Lot of information in Life If we implement new features. The stable Version should Not do debug logging.

LeoSalm commented 2 years ago

I can confirm the OPs issue. I have here a small city with ~30k Sims, the log is "only" 41MB. But counting the [Debug] lines gives 410832 Debug lines (out of 417108 total lines)

$ grep -c "\[Debug\]" AdaptiveRoads.log 410832 $ grep -c "\[Info\]" AdaptiveRoads.log 3397 $ grep -c "\[Warning\]" AdaptiveRoads.log 2768 $ wc -l AdaptiveRoads.log 417108 AdaptiveRoads.log

I'm subscribed to stable version (see last line below)

[Info] 0ms | Log file at /hdisks/data2/SteamLibrary/steamapps/common/Cities_Skylines/Cities_Data/Logs/AdaptiveRoads.log now=08/10/2022 13:58:24 [Info] 0ms | AdaptiveRoads Version:3.8.6.17620 Commit:7604473 CommitDate:2022-07-03T21:38:09+03:00 [Debug] 0ms | Testing StackTrace: at AdaptiveRoads.LifeCycle.LifeCycle.Enable() at AdaptiveRoads.LifeCycle.UserMod.OnEnabled() at System.Reflection.MonoMethod.InternalInvoke(System.Object , System.Object[] , System.Exception ByRef ) at System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) at System.Reflection.MethodBase.Invoke(System.Object obj, System.Object[] parameters) at ColossalFramework.Plugins.PluginManager.AddPlugins(System.Collections.Generic.Dictionary`2 plugins) at ColossalFramework.Plugins.PluginManager.LoadPlugins() at Starter.Awake() [Info] 8ms | Found plug-in:Adaptive Networks 3.8 [Info] 8ms | Initializing Log.FlushTread [Info] 9ms | LifeCycle.HotReload3rdparty() called. [Info] 9,733ms | option Verbose log is False [Info] 9,733ms | option Buffered log is True [Info] 116,467ms | LifeCycle.Preload() called [Info] 116,469ms | Installed mods are: ... ...

kianzarrin commented 2 years ago

closing because Stable has less log.