Jump to content


Structured logs location


  • Please log in to reply
4 replies to this topic

#1 Erik

Erik

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 11 December 2018 - 09:43 AM

Hello,

Stared using structured logs but they all end up in the p4d root folder. Is there a way to have them stored in say ./log?


/Regards

#2 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts
  • LocationSan Francisco, CA

Posted 13 December 2018 - 01:07 AM

Yep! There are server configurables for that. You'll want to use 'serverlog.file' and probably 'serverlog.retain'.

We set these separately on each of our many servers in case we ever want to change the path for one, but generally we have all these set. Path is a full path, retain is number of days to keep:

# p4 configure show | grep serverlog
serverlog.file.1=/p4/1/logs/structured/auth.log (configure)
serverlog.file.2=/p4/1/logs/structured/commands.log (configure)
serverlog.file.3=/p4/1/logs/structured/errors.log (configure)
serverlog.file.7=/p4/1/logs/structured/events.log (configure)
serverlog.file.8=/p4/1/logs/structured/integrity.log (configure)
serverlog.retain.1=14 (configure)
serverlog.retain.2=14 (configure)
serverlog.retain.3=14 (configure)
serverlog.retain.7=14 (configure)
serverlog.retain.8=14 (configure)

-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com

#3 Erik

Erik

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 13 December 2018 - 05:39 AM

Had missed you could set a path in the "serverlog.file.x=/path/auth.csv" command.

Works now. Thanks.

#4 UnstoppableDrew

UnstoppableDrew

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 17 December 2018 - 08:45 PM

There are 2 features that would dramatically improve structured logs, a second 'archive' path for the rotated logs, and an option to compress on rotation. My company's policy is to maintain 365 days of logs, and we log auth, commands, errors & events. Our log directory currently has 1510 files using a collective 735GB. I would like the option to rotate each log to a different directory and compress the file. That way I keep the current log in the main logs directory, but it's much easier to find, and I still have my year worth of retention, but at significantly less disk usage.

#5 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts
  • LocationSan Francisco, CA

Posted 08 January 2019 - 10:32 PM

View PostUnstoppableDrew, on 17 December 2018 - 08:45 PM, said:

There are 2 features that would dramatically improve structured logs, a second 'archive' path for the rotated logs, and an option to compress on rotation. My company's policy is to maintain 365 days of logs, and we log auth, commands, errors & events. Our log directory currently has 1510 files using a collective 735GB. I would like the option to rotate each log to a different directory and compress the file. That way I keep the current log in the main logs directory, but it's much easier to find, and I still have my year worth of retention, but at significantly less disk usage.

Yikes! We have a similar policy, but lucky for me, IT maintains a Splunk instance and parsing structured logs into it is a snap. As the old adage goes (that I just made up), "If IT wants it, IT stores it."
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users