#Using Unity.Logging to write a NativeText/NativeList<FixedString4056Bytes> to a file

1 messages · Page 1 of 1 (latest)

remote glen
#

I am trying to write a NativeText/NativeList<FixedString4056Bytes> to a file. Seems like the combination of using Unity.Logging with Burst and Jobs is currently the fastest way but I am getting this error:

[LogMemoryAllocator]  state: 
  Update Count: 4137
  BufferA: 262072 / 262144 [Active]
  BufferB: Not created
  Overflow: 163840 / 163840
  Locked buffers (with LockPayloadBuffer): 1
  Deferred release PayloadHandlesX: 0 [Active]
  Deferred release PayloadHandlesY: 0```

How can i change the logging settings?
willow raft
#

Create your own LogBootstrap as explained at the bottom here
https://docs.unity3d.com/Packages/com.unity.logging@1.3/manual/default-configuration.html

Create it during [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]

Then when you call CreateLogger at the end of your method chain you can pass your own LogMemoryManagerParameters

You can check the source to see how the DefaultSettings are configured here:

..\Library\PackageCache\com.unity.logging\Runtime\DefaultSettings.cs

remote glen
#

Thank you I will try it!

remote glen
devout sorrel
#
            // In the editor we increase the default (64) capacity to allow verbose spamming
            managerParameters.InitialBufferCapacity = 1024 * 512;
#endif```
#

i SIGNIFICANTLY increased default capacity for my own logger

#

(1024*64 is default)