Need to log user logins from multiple application servers

Team,

I am using readcsvlog plugin to read login audit.csv and then writing to database.

PROD we have two application severs and sometime it is reading from a file which have less logins . I want it to read it from both application sever .

Below is the code. In CSV path i want to pass location of application sever instead of checking at /logs. Any idea?

readcsvlog(
csvPath: "login-audit.csv."& text(today()-ri!number,"yyyy-mm-dd"),
startIndex: 1,
batchSize: - 1
),

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    as a best practice I would avoid having server specific code in an application. If you are on premise you can solve this at server level. Implementing a cron job which copies and combines the content of both files into one with specific name once per day. With the readcsvlog plugin you can read this file
    and fetch the content. As the documentation of the plugin states - you have to make sure the file you are going to read resides in the log\ directory.

Reply
  • Hi,
    as a best practice I would avoid having server specific code in an application. If you are on premise you can solve this at server level. Implementing a cron job which copies and combines the content of both files into one with specific name once per day. With the readcsvlog plugin you can read this file
    and fetch the content. As the documentation of the plugin states - you have to make sure the file you are going to read resides in the log\ directory.

Children