• Print

Author Topic: Change how ULX logs?  (Read 3605 times)

0 Members and 1 Guest are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Change how ULX logs?
« on: June 10, 2016, 03:15:37 pm »
I just have a quick question: Is there a way to change how ULX logs things? I know there is a
Code: Lua
  1.       ulx.log_file = os.date( "data/" .. logDir:GetString() .. "/" .. "%m-%d-%y" .. ".txt" )
  2.  
thing in the log.lua, but how can I change %m-%d-%y to make it actually say like June 10, 2016?
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Change how ULX logs?
« Reply #1 on: June 10, 2016, 07:31:09 pm »
Take a look at the string flags for date/time formatting here: http://www.mkssoftware.com/docs/man3/strftime.3.asp

So instead of %m-%d-%y

try, %B %d, %Y

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Change how ULX logs?
« Reply #2 on: June 12, 2016, 03:29:26 am »
I'm a bit late to the party, but you do realize that the line in question determines the file name for the logs, right?

I see uppercase letters, spaces, and commas in your example. These are all things you probably don't want in a file name.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Change how ULX logs?
« Reply #3 on: June 12, 2016, 07:38:57 am »
No, he was right. They're what I was asking for :P
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

  • Print