Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by nyonge · Jan 26, 2020 at 08:16 PM · erroreditordebuglogprevent

Prevent editor-prev.log file from getting too big

So there are lots of people who've noted that the editor-prev.log filesize can get huge.

Obviously there's lots of value to looking at it to find out why it's so big, but folks are regularly complaining that it gets so big that they can't even open it without splitting the file up somehow. My computer recently crashed after the file suddenly ballooned to almost 300gb.

Is there any way to prevent the file from getting so big in the first place? Maybe capping it at 10gb or whatever?

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sacredgeometry · Jan 26, 2020 at 08:31 PM 0
Share

What os are you on? Regularly deleting it is pretty trivial but you can automate the process in a bunch of different ways.

avatar image nyonge sacredgeometry · Jan 26, 2020 at 08:51 PM 0
Share

Win 10 64-bit, though I also use a $$anonymous$$acbook pretty frequently (El Capitan, I think).

Cheers. I'd considered automated deletion, though I don't know how to automate deletion based on filesize. When the file grew to ~300gb for me, it happened within a few $$anonymous$$utes without me noticing until crash. A time-scheduled deletion wouldn't really help there - hence wanting to cap it.

avatar image sacredgeometry nyonge · Jan 26, 2020 at 09:17 PM 1
Share

on the mac you can use automator to create a file watcher to do it. on windows you could write a file watching service to do it too.

https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.8


I think if you have that many editor errors you are doing something really really wrong in your code but it may be mostly accumulative in which case writing something that on system start or ending a user session deletes the file will probably keep it in check if its not already a temporary file.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Jan 29, 2020 at 10:29 AM

Sorry but 300 gb log file means you do something wrong ^^. It's not the "editor-prev.log" that gets that big, it's your actual editor log file. Unity will rename the old editor log to editor-pref.log at start. Have you ever bothered to look into that log to see what's taking up that much space? That sounds like you have a bazillion Debug.Log / print calls per frame or that you somehow generate countless of warnings or errors. You should find the root of your problem instead of trying to fix the symptoms.


Each time you restart the Unity editor you start with a new empty editor log. So if your log grows to 300+GB that has to happen within the same session. About opening / handling of large log files, there are plenty of solutions out there like this one (first result after a 2 second google search). Anyways as I said you should find and fix the cause of your exploding log file rather than patching around that symptom.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nyonge · Jan 29, 2020 at 08:37 PM 0
Share

Thanks! Turns out it was something with ProBuilder that suddenly sent a deluge of errors my way, I managed to reproduce it once playing around in the UV editor but haven't been able to since. Not super fixable on my end, @sacredgeometry noted above how to do some methods to prevent that from happening. Good to know the log gets refreshed every time Unity is rebooted though :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

186 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to resolve UnauthorizedAccessException 0 Answers

`UnityEngine.Debug' does not contain a definition for `LogException' 3 Answers

Is there a way to force Debug.Log(string, object) to ALWAYS draw the context? 1 Answer

Editor Console window message no longer wraps... Help? Please? 1 Answer

Tracking down causes of Editor errors. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges