Results 1 to 6 of 6

Thread: Server Log sever

  1. #1
    Premium User
    Join Date
    Jul 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    Lightbulb Server Log sever

    Hello, All
    I need action that saves the server log to file .txt
    Anybody can help me ?

    ropiotrek

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    You cant bot this.


    Just right click on it and save it.
    Last edited by pink_panther; 04-30-2014 at 10:07 PM.

  3. #3
    Focus Group
    Join Date
    Jun 2012
    Posts
    26
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    49
    Rep Power
    5
    this is actually possible, but I wonder why would you need it, you would get a huge file

  4. #4
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by Pruebando View Post
    this is actually possible, but I wonder why would you need it, you would get a huge file
    no it wouldn't be.

    and if you can, explain how, dont just say it can be done.

  5. #5
    Focus Group
    Join Date
    Jun 2012
    Posts
    26
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    49
    Rep Power
    5
    Code:
    local f = io.open("./files/Server Log " .. os.date("%d %m", os.time()) .. ".txt", "a+")
    if not f then return end
    
    local messages = getnewmessages("Server Log")
    for i = 0, (messages.count - 1) do
    	f:write(messages[i].text .. "\n")
    end
    f:close()

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Ah yeah, just using standard lua to output it to a file, I probably could have figured that out, still don't see any good reason to do it though

    Well done though. good stuff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •