Change Log File Location

Clayton Hall
Clayton Hall Member Posts: 1 ✭✭

I couldn't find a place to change the log file location in the UI. I was able to find where they were set in the config files.

(This was a problem for me, because my the default writes to documents which I keep synced with OneDrive)

I wrote this script and executed and LinqPad, to point the logs to a temp directory. I thought I'd share in case anyone else ran into the same problem.

Any chance this could be added to the UI, so I don't have to re-run the script after updates,etc?

var regex = @(\$\{specialfolder:folder=MyDocuments:dir=Proclaim\sLog\sFiles\})\\([\w\.]*log);
new DirectoryInfo($@{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}\AppData\Local\Proclaim)
.GetFiles("*.config", SearchOption.AllDirectories)
.Select(fi=> new {FileInfo = fi, Text = Regex.Replace(File.ReadAllText(fi.FullName), regex, @c:\temp\Proclaim\$2)})
.ToList()
.ForEach(x=>File.WriteAllText(x.FileInfo.FullName, x.Text));

Comments

  • MJ. Smith
    MJ. Smith MVP Posts: 55,544

    bump 11

    Orthodox Bishop Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."; Orthodox proverb: "We know where the Church is, we do not know where it is not."

  • Jordan Sjodin
    Jordan Sjodin Member, Community Manager, Logos Employee Posts: 994

    Thanks for the report. We actually just changed this to have the logs stored elsewhere. Next time we ship it will be in the new location. Thanks for bringing it up!

    Mac | iOS | Android | Windows | Web Developer