Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

how do you quickly clear the Editor Log file?

Discussion in 'Editor & General Support' started by sealiongames, Oct 20, 2010.

  1. sealiongames

    sealiongames

    Joined:
    Oct 6, 2008
    Posts:
    98
    how do you quickly clear the Editor Log file?

    thanks
     
  2. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    I was able to do this by opening it, deleting the contents, and then saving it over the original. But, I'm not sure if that's the correct way to do it.
     
    IgorAherne, Pawl and jmasinteATI like this.
  3. inZania

    inZania

    Joined:
    Mar 3, 2016
    Posts:
    28
    Deleting the contents does not stop the log file from growing, as Unity zeros out the memory and appends internally. So if you use the above approach to clear a 4 Mb .log file, it'd go to zero bytes, and then right back to 4 Mb as soon as Unity appended the next log. If you have access to your Unity C# code, you can call the `UnityEngine.Debug.ClearDeveloperConsole();` method.
     
    aobilkx likes this.
  4. Romeno

    Romeno

    Joined:
    Jun 24, 2013
    Posts:
    34
    This does not work.

    This works.

    I think there should be a command or some other way to do this from scripts, no?
     
  5. GustavoZabala

    GustavoZabala

    Joined:
    Aug 10, 2017
    Posts:
    3
    You could delete the editor.log file, but you should exit unity first, since it opens in exclusive way. The file is in %USERPROFILE%\AppData\Local\Unity\Editor\Editor.log