On Fri, Jun 22, 2012 at 5:36 PM, Léa Massiot <lmhe...@orange.fr> wrote:
> Hi again, > > I'm running "PostgreSQL 9.1" under "Windows XP". > I'm still trying to set a proper logging system for a PostgreSQL cluster > "a_pg_cluster". > > In the cluster "postgresql.conf" configuration file, I uncommented > "logging_connector = on". > When I stopped + started the service, I could see a "pg_log" directory had > been created with a log file inside. > > Now, I would like: > 1) to store the cluster log files somewhere else say, for example: > "C:\postgresql\logs\a_pg_cluster\" > 2) to have several small log files instead of a big one and log rotation. > > Yet, when I set the "log_directory" parameter in the following way: > "log_directory = 'C:\postgresql\logs\a_pg_cluster\'" and stop + start the service, it fails with always the same unusable > message: > "The a_pgcluster_srv service on Local Computer started and then stopped. > Some services stop automatically if they have no work to do, for example, > the Performance Logs and Alerts service." > > In the manual, one can read: > "When logging_collector is enabled, this parameter determines the directory > in which log files will be created. It can be specified as an absolute > path, > or relative to the cluster data directory. This parameter can only be set > in > the postgresql.conf file or on the server command line." > > So, what's wrong with it? > > I would be happy with the following configuration: > > logging_collector = on > log_directory = "C:\postgresql\logs\a_pg_cluster\" > log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' > log_rotation_size = 10MB > log_min_messages = PANIC > log_error_verbosity = VERBOSE > > except, it doesn't work... and I'm not sure about the levels "PANIC" and > "VERBOSE". > > Can you help? > > Here two thing's, One you should have full access on the directory for Postgres User. Second, you need to give directory name as below. log_directory = 'C:\\postgresql\\logs\\a_pg_cluster' --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/