How to Change Log Location

(Kurtis Lamb) #1

hello!

We had an issue a few months ago which meant doing a SQL restore and we noticed that the log location has moved off the location it should be,

Is there a way to change where the logs actually go, right now they are in the default C:\octopus but we want them in another location because… reasons :smile:

Cheers
Kurt

0 Likes

(Kurtis Lamb) #2

So having looked closer i can see the Octopus Server Manager is pointing to a directory that it can see yet the logs are not been written to it.

Is there anyway to find why the logs are not writing anything out ?

0 Likes

(Kenneth Bates) #4

Hi Kurt,

Thanks for getting in touch! I’m sorry to hear you’ve hit this issue. You can change where the logs are with the Octopus.Server.exe command line using the path command and --taskLogs=VALUE option as shown in the following doc page.

Is this what you’re after? Let me know how you go and if this resolves your issue. :slight_smile:

Best regards,

Kenny

0 Likes

(Kurtis Lamb) #5

Hi Kenny,

I think i can do that :slight_smile:

If i can recreate the issue in our Dev instance ill test that first but i am not having any success. It may just have to be a try it and see as the impact is minimal

Thanks again
Kurt

0 Likes

(Kurtis Lamb) #6

Hi Kenny,

So just had a look at the above and it refers to Task Logs, having made the change on our Dev instance i see it move the task logs but not the actual server logs. They currently still show - C:\Octopus\Logs

On our Live server these arent been created but even if they were i need to move them

Any thoughts?

Cheers
Kurt

0 Likes

(Kurtis Lamb) #7

Specifically this file OctopusServer.txt, it has stopped logging entirely

0 Likes

(Kurtis Lamb) #8

Kenny! your going to be sick of these emails, i resolved it :slight_smile:

Would be good to know the above anyway, but this was an hardening issue on the box which prevented the Service account running accessing that location.

0 Likes

(Kenneth Bates) #9

Hi Kurtis,

Thanks for following up and letting me know the outcome! I apologize about the delay in my response. There are two ways to change where the server logs are located:

  1. Modify the Octopus.Server.exe.nlog file, and by default they’re set to:
fileName="${octopusLogsDirectory}/OctopusServer.txt"
archiveFileName="${octopusLogsDirectory}/OctopusServer.{#}.txt"

However this will reset on upgrade, so this is probably not ideal.

  1. Move the whole Home Directory (C:\Octopus by default) as outlined with a PowerShell script at the following doc page.

I hope this helps! Don’t hesitate to reach out if you have any further questions moving forward. :slight_smile:

Best regards,

Kenny

0 Likes

(system) closed #10

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes