Skip to content

Server logs to Postgresql #5186

Answered by houshmandX
houshmandX asked this question in Q&A
May 11, 2022 · 2 comments · 13 replies
Discussion options

You must be logged in to vote

here is the solution from my end:

  1. for creating a table increase the varchar for logger and change the d(data type), so create the table as below:

CREATE TABLE LOGS (USER_ID VARCHAR(20) NOT NULL, DATED DATE NOT NULL, LOGGER VARCHAR(100) NOT NULL, LEVEL VARCHAR(10) NOT NULL, MESSAGE VARCHAR(1000) NOT NULL );

  1. add/copy postgres_jdbc.jar from the database folder in MC, and past/place it in server-launcher-lib folder in MC(mirth connect).
  2. change date format '%d' to '%d{yyyy-MM-dd}'

here is my final log4j.properties that saves server logs to Postgres db:

# sample properties to initialize log4j
log4j.rootLogger = ERROR,stdout,fout,DB

# stdout appender
log4j.appender.stdout = org.apache.log4j…

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
11 replies
@ab-20-m
Comment options

@houshmandX
Comment options

@jonbartels
Comment options

@houshmandX
Comment options

@houshmandX
Comment options

Comment options

You must be logged in to vote
2 replies
@1jon11
Comment options

@pacmano1
Comment options

Answer selected by houshmandX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants