{"id":15073,"date":"2016-12-06T10:00:46","date_gmt":"2016-12-06T09:00:46","guid":{"rendered":"https:\/\/www.credativ.de\/blog\/credativ-inside\/howto-centralized-and-semantic-logging-for-postgresql\/"},"modified":"2016-12-06T10:00:46","modified_gmt":"2016-12-06T09:00:46","slug":"howto-centralized-and-semantic-logging-for-postgresql","status":"publish","type":"post","link":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/","title":{"rendered":"[Howto] Centralized and Semantic Logging for PostgreSQL<sup>\u00ae<\/sup>"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Today, there is no need to argue why <a href=\"https:\/\/www.credativ.de\/software\/logging\/graylog2\/\">centralized logging<\/a> is useful or even necessary. Most medium-sized companies now have centralized logging or are currently implementing it. <\/p>\n<p>Once the infrastructure is in place, it is important to use it effectively and efficiently! Especially as an infrastructure operator or service provider, the goal is to optimally support different stakeholders with different requirements. For example, the development department should have continuous access to all logs from their test systems. However, from production, perhaps only all error messages are needed in real time, but more upon request.   <\/p>\n<p>Such models can be easily implemented and tested with <a href=\"https:\/\/www.credativ.de\/software\/logging\/graylog2\/\">graylog<\/a>\u00ae or Kibana\u00ae. Classification and analysis may work well and efficiently in test operations or small environments with PostgreSQL<sup>\u00ae<\/sup> default settings. However, when operating a large number of databases or retaining logs for extended periods, usage can quickly become difficult.  <\/p>\n<h2>Problem Statement<\/h2>\n<p>Log entries are centrally captured and can in principle be used. In practice, however, it is difficult to impossible to extract all relevant information in a timely manner. Searching for specific entries requires full-text searches with wildcards, which is no longer practical with large data volumes.  <\/p>\n<p>For example, if you want to grant specific groups access exclusively to logs that meet certain functional criteria, such as database name, error_severity, or similar, this must be implemented through full-text search and error-prone filters.<\/p>\n<p>If a DBA wants to see all messages from a specific user, a specific query, or a session, this requires particularly complex indexing for wildcard searches. Alternatively, such queries are very slow and cannot be answered immediately. <\/p>\n<table border=\"1\" cellpadding=\"10\">\n<tbody>\n<tr>\n<td><b>Starting Point:<\/b><\/td>\n<td>Centralized logging has already been implemented, e.g., ELK Stack or graylog\u00ae.<\/td>\n<\/tr>\n<tr>\n<td><b>Goal:<\/b><\/td>\n<td>We want to capture PostgreSQL<sup>\u00ae<\/sup> log messages semantically and thereby efficiently: classify, group, and analyze them.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Alternative<\/h2>\n<p>The alternative is to capture log messages semantically and store the individual fields in an appropriate data structure.<\/p>\n<p>If the normal stderr log is used, parsing becomes difficult to impossible, as the individual fields cannot be identified. However, <a href=\"https:\/\/www.credativ.de\/portfolio\/support\/postgresql-competence-center\/\">PostgreSQL<sup>\u00ae<\/sup><\/a> also offers the option to produce log messages in CSV format (csvlog). This outputs all fields comma-separated. <\/p>\n<table border=\"2\" cellpadding=\"10\">\n<tbody>\n<tr>\n<td><b>Excursus:<\/b> <em>The idea is not new. For a long time, some DBAs have been loading their logs directly back into a PostgreSQL<sup>\u00ae<\/sup> table. This allows them to search and process the logs with SQL and all familiar built-in tools. DBAs are usually very satisfied with this construct, but it represents an isolated solution. Example table for PostgreSQL<sup>\u00ae<\/sup> 9.5:    <\/em><\/p>\n<div class=\"geshifilter\">\n<pre class=\"text geshifilter-text\">CREATE TABLE postgres_log\n(\n  log_time timestamp(3) with time zone,\n  user_name text,\n  database_name text,\n  process_id integer,\n  connection_from text,\n  session_id text,\n  session_line_num bigint,\n  command_tag text,\n  session_start_time timestamp with time zone,\n  virtual_transaction_id text,\n  transaction_id bigint,\n  error_severity text,\n  sql_state_code text,\n  message text,\n  detail text,\n  hint text,\n  internal_query text,\n  internal_query_pos integer,\n  context text,\n  query text,\n  query_pos integer,\n  location text,\n  application_name text,\n  PRIMARY KEY (session_id, session_line_num)\n);<\/pre>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Structure<\/h2>\n<p><a href=\"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1559\" src=\"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png\" alt=\"Logging\" width=\"499\" height=\"321\" srcset=\"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png 300w, https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-180x116.png 180w, https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-600x386.png 600w, https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging.png 756w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<h2>Implementation<\/h2>\n<p>The csvlog can serve as the basis for efficiently populating a centralized logging system. To keep further processing as simple as possible and to avoid committing to a specific logging system, we translate the log from CSV to JSON. It can then be fed in as desired. In the following example, TCP is used.   <\/p>\n<p>To change the log format, the following options must be adjusted in PostgreSQL<sup>\u00ae<\/sup>:<\/p>\n<div class=\"geshifilter\">\n<pre class=\"text geshifilter-text\">#------------------------------------------------------------------------------\n# ERROR REPORTING AND LOGGING\n#------------------------------------------------------------------------------\n \n# - Where to Log -\n \nlog_destination = 'csvlog' # Valid values are combinations of\n  # stderr, csvlog, syslog, and eventlog,\n  # depending on platform. csvlog \n  # requires logging_collector to be on.\n \n# This is used when logging to stderr:\nlogging_collector = on # Enable capturing of stderr and csvlog\n  # into log files. Required to be on for \n  # csvlogs.\n  # (change requires restart)\n  # These are only used if logging_collector is on:\nlog_directory = '\/var\/log\/postgresql' # directory where log files are written,\n  # can be absolute or relative to PGDATA<\/pre>\n<\/div>\n<p>For parsing and translating to JSON as well as delivering to the logging system, we use logstash\u00ae with the following configuration as a Jinja2 template:<\/p>\n<div class=\"geshifilter\">\n<pre class=\"text geshifilter-text\">input {\n  file {\n  \"path\" =&gt;  \"\/var\/log\/postgresql\/*.csv\"\n  \"sincedb_path\" =&gt;  \"\/tmp\/sincedb_pgsql\"\n  # fix up multiple lines in log output into one entry\n  codec =&gt;  multiline {\n  pattern =&gt;  \"^%{TIMESTAMP_ISO8601}.*\"\n  what =&gt;  previous\n  negate =&gt;  true\n  }\n  }\n}\n \n# Filter is tested for PostgreSQL<sup>\u00ae<\/sup>  9.5\nfilter {\n  csv {\n  columns =&gt;  [ \"pg_log_time\", \"pg_user_name\", \"pg_database_name\",\n  \"pg_process_id\", \"pg_connection_from\", \"pg_session_id\",\n  \"pg_session_line_num\", \"pg_command_tag\",\n  \"pg_session_start_time\", \"pg_virtual_transaction_id\",\n  \"pg_transaction_id\", \"pg_error_severity\", \"pg_sql_state_code\",\n  \"pg_sql_message\", \"pg_detail\", \"pg_hint\", \"pg_internal_query\",\n  \"pg_internal_query_pos\", \"pg_context\", \"pg_query\",\n  \"pg_query_pos\", \"pg_location\", \"pg_application_name\" ]\n  }\n \n  date {\n  #2014-05-22 17:02:35.069 CDT\n  match =&gt;  [\"log_time\", \"YYYY-MM-dd HH:mm:ss.SSS z\"]\n  }\n \n  mutate {\n  add_field =&gt;  {\n  \"application_name\" =&gt;  \"postgres\"\n  }\n  }\n \n}\n \noutput {\n  tcp {\n  host =&gt;  \"{{ log_server }}\"\n  port =&gt;  {{ log_port }}\n  codec =&gt;  \"json_lines\"\n  }\n}<\/pre>\n<\/div>\n<p>It is important that the filter for translating the CSV fields is adapted to the PostgreSQL<sup>\u00ae<\/sup> major version being used. The fields can differ from version to version. In most cases, new fields are added.  <\/p>\n<p>Also note that logstash\u00ae has difficulty recognizing the timestamp independently. The specific format should be specified (time zone). <\/p>\n<p>The following variables must be set:<\/p>\n<table border=\"1\" cellpadding=\"10\">\n<tbody>\n<tr>\n<td><b>{{ log_server }}<\/b><\/td>\n<td>Log server, in our case a graylog\u00ae<\/td>\n<\/tr>\n<tr>\n<td><b>{{ log_port }}<\/b><\/td>\n<td>Port on the log server<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Configured this way, log files can be efficiently classified and searched. Permissions are also easier to manage. <\/p>\n<ul>\n<li>Permission at database level =&gt; pg_database_name<\/li>\n<li>Severity =&gt; pg_error_severity<\/li>\n<li>Permission for logs from specific hosts =&gt; pg_connection_from<\/li>\n<li>Permission for logs from specific applications =&gt; pg_application_name<\/li>\n<\/ul>\n<p><b>Important:<\/b> The normal stderr log should in any case still be included in centralized logging. After startup, no normal operational messages from PostgreSQL<sup>\u00ae<\/sup> will appear here, but error outputs from involved processes will. For example, the stderr output of a failed archive command can be found here. This information is essential for administration.   <\/p>\n<p>We already support numerous customers in operating the described procedure in production. If you have questions about this topic or need support, please feel free to contact our <a href=\"https:\/\/www.credativ.de\/portfolio\/support\/postgresql-competence-center\/\">PostgreSQL<sup>\u00ae<\/sup> Competence Center<\/a>. <\/p>\n<p><em>This article was originally written by Alexander Sosna.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Today, there is no need to argue why centralized logging is useful or even necessary. Most medium-sized companies now have centralized logging or are currently implementing it. Once the infrastructure is in place, it is important to use it effectively and efficiently! Especially as an infrastructure operator or service provider, the goal is to [&hellip;]<\/p>\n","protected":false},"author":90,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_improvement_type_select":"improve_an_existing","_thumb_yes_seoaic":false,"_frame_yes_seoaic":false,"seoaic_generate_description":"","seoaic_improve_instructions_prompt":"","seoaic_rollback_content_improvement":"","seoaic_idea_thumbnail_generator":"","thumbnail_generated":false,"thumbnail_generate_prompt":"","seoaic_article_description":"","seoaic_article_subtitles":[],"footnotes":""},"categories":[1885,1708],"tags":[1846,1801],"class_list":["post-15073","post","type-post","status-publish","format-standard","hentry","category-howtos-en","category-postgresql-en","tag-logging-en","tag-postgresql-en"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae - credativ\u00ae<\/title>\n<meta name=\"description\" content=\"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae\" \/>\n<meta property=\"og:description\" content=\"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"credativ\u00ae\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/credativDE\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-06T09:00:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging.png\" \/>\n\t<meta property=\"og:image:width\" content=\"756\" \/>\n\t<meta property=\"og:image:height\" content=\"486\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"credativ Redaktion\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@credativde\" \/>\n<meta name=\"twitter:site\" content=\"@credativde\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"credativ Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/\"},\"author\":{\"name\":\"credativ Redaktion\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#\\\/schema\\\/person\\\/63430ac9e022ccceba0f8d53ffe6db12\"},\"headline\":\"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae\",\"datePublished\":\"2016-12-06T09:00:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/\"},\"wordCount\":728,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Logging-300x193.png\",\"keywords\":[\"Logging\",\"PostgreSQL\u00ae\"],\"articleSection\":[\"HowTos\",\"PostgreSQL\u00ae\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#respond\"]}],\"copyrightYear\":\"2016\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/\",\"url\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/\",\"name\":\"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae - credativ\u00ae\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Logging-300x193.png\",\"datePublished\":\"2016-12-06T09:00:46+00:00\",\"description\":\"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Logging-300x193.png\",\"contentUrl\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/Logging-300x193.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/\",\"name\":\"credativ GmbH\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Organization\",\"Place\"],\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#organization\",\"name\":\"credativ\u00ae\",\"url\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/\",\"logo\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#local-main-organization-logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#local-main-organization-logo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/credativDE\\\/\",\"https:\\\/\\\/x.com\\\/credativde\",\"https:\\\/\\\/mastodon.social\\\/@credativde\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/credativ-gmbh\",\"https:\\\/\\\/www.instagram.com\\\/credativ\\\/\"],\"description\":\"Die credativ GmbH ist ein f\u00fchrendes, auf Open Source Software spezialisiertes IT-Dienstleistungs- und Beratungsunternehmen. Wir bieten umfassende und professionelle Services, von Beratung und Infrastruktur-Betrieb \u00fcber 24\\\/7 Support bis hin zu individuellen L\u00f6sungen und Schulungen. Unser Fokus liegt auf dem ganzheitlichen Management von gesch\u00e4ftskritischen Open-Source-Systemen, darunter Betriebssysteme (z.B. Linux), Datenbanken (z.B. PostgreSQL), Konfigurationsmanagement (z.B. Ansible, Puppet) und Virtualisierung. Als engagierter Teil der Open-Source-Community unterst\u00fctzen wir unsere Kunden dabei, die Vorteile freier Software sicher, stabil und effizient in ihrer IT-Umgebung zu nutzen.\",\"legalName\":\"credativ GmbH\",\"foundingDate\":\"2025-03-01\",\"duns\":\"316387060\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"},\"address\":{\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#local-main-place-address\"},\"geo\":{\"@type\":\"GeoCoordinates\",\"latitude\":\"51.1732374\",\"longitude\":\"6.392010099999999\"},\"telephone\":[\"+4921619174200\",\"08002733284\"],\"contactPoint\":{\"@type\":\"ContactPoint\",\"telephone\":\"08002733284\",\"email\":\"vertrieb@credativ.de\"},\"openingHoursSpecification\":[{\"@type\":\"OpeningHoursSpecification\",\"dayOfWeek\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],\"opens\":\"09:00\",\"closes\":\"17:00\"},{\"@type\":\"OpeningHoursSpecification\",\"dayOfWeek\":[\"Saturday\",\"Sunday\"],\"opens\":\"00:00\",\"closes\":\"00:00\"}],\"email\":\"info@credativ.de\",\"areaServed\":\"D-A-CH\",\"vatID\":\"DE452151696\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/#\\\/schema\\\/person\\\/63430ac9e022ccceba0f8d53ffe6db12\",\"name\":\"credativ Redaktion\",\"description\":\"Dieser Account dient als Sammelpunkt f\u00fcr die wertvollen Beitr\u00e4ge ehemaliger Mitarbeiter von credativ. Wir bedanken uns f\u00fcr ihre gro\u00dfartigen Inhalte, die das technische Wissen in unserem Blog \u00fcber die Jahre hinweg bereichert haben. Ihre Artikel bleiben hier weiterhin f\u00fcr unsere Leser zug\u00e4nglich.\"},{\"@type\":\"PostalAddress\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#local-main-place-address\",\"streetAddress\":\"Hennes-Weisweiler-Allee 23\",\"addressLocality\":\"M\u00f6nchengladbach\",\"postalCode\":\"41179\",\"addressRegion\":\"Deutschland\",\"addressCountry\":\"DE\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.credativ.de\\\/en\\\/blog\\\/postgresql-en\\\/howto-centralized-and-semantic-logging-for-postgresql\\\/#local-main-organization-logo\",\"url\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/credativ-logo-right.svg\",\"contentUrl\":\"https:\\\/\\\/www.credativ.de\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/credativ-logo-right.svg\",\"caption\":\"credativ\u00ae\"}]}<\/script>\n<meta name=\"geo.placename\" content=\"M\u00f6nchengladbach\" \/>\n<meta name=\"geo.position\" content=\"51.1732374;6.392010099999999\" \/>\n<meta name=\"geo.region\" content=\"Germany\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae - credativ\u00ae","description":"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae","og_description":"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.","og_url":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/","og_site_name":"credativ\u00ae","article_publisher":"https:\/\/www.facebook.com\/credativDE\/","article_published_time":"2016-12-06T09:00:46+00:00","og_image":[{"width":756,"height":486,"url":"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging.png","type":"image\/png"}],"author":"credativ Redaktion","twitter_card":"summary_large_image","twitter_creator":"@credativde","twitter_site":"@credativde","twitter_misc":{"Written by":"credativ Editorial Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#article","isPartOf":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/"},"author":{"name":"credativ Redaktion","@id":"https:\/\/www.credativ.de\/en\/#\/schema\/person\/63430ac9e022ccceba0f8d53ffe6db12"},"headline":"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae","datePublished":"2016-12-06T09:00:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/"},"wordCount":728,"commentCount":0,"publisher":{"@id":"https:\/\/www.credativ.de\/en\/#organization"},"image":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png","keywords":["Logging","PostgreSQL\u00ae"],"articleSection":["HowTos","PostgreSQL\u00ae"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#respond"]}],"copyrightYear":"2016","copyrightHolder":{"@id":"https:\/\/www.credativ.de\/#organization"}},{"@type":"WebPage","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/","url":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/","name":"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae - credativ\u00ae","isPartOf":{"@id":"https:\/\/www.credativ.de\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png","datePublished":"2016-12-06T09:00:46+00:00","description":"With semantic logging for PostgreSQL, you can effectively meet different requirements and use logs efficiently.","breadcrumb":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#primaryimage","url":"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png","contentUrl":"https:\/\/www.credativ.de\/wp-content\/uploads\/2019\/06\/Logging-300x193.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.credativ.de\/en\/"},{"@type":"ListItem","position":2,"name":"[Howto] Centralized and Semantic Logging for PostgreSQL\u00ae"}]},{"@type":"WebSite","@id":"https:\/\/www.credativ.de\/en\/#website","url":"https:\/\/www.credativ.de\/en\/","name":"credativ GmbH","description":"","publisher":{"@id":"https:\/\/www.credativ.de\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.credativ.de\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Organization","Place"],"@id":"https:\/\/www.credativ.de\/en\/#organization","name":"credativ\u00ae","url":"https:\/\/www.credativ.de\/en\/","logo":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#local-main-organization-logo"},"image":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#local-main-organization-logo"},"sameAs":["https:\/\/www.facebook.com\/credativDE\/","https:\/\/x.com\/credativde","https:\/\/mastodon.social\/@credativde","https:\/\/www.linkedin.com\/company\/credativ-gmbh","https:\/\/www.instagram.com\/credativ\/"],"description":"Die credativ GmbH ist ein f\u00fchrendes, auf Open Source Software spezialisiertes IT-Dienstleistungs- und Beratungsunternehmen. Wir bieten umfassende und professionelle Services, von Beratung und Infrastruktur-Betrieb \u00fcber 24\/7 Support bis hin zu individuellen L\u00f6sungen und Schulungen. Unser Fokus liegt auf dem ganzheitlichen Management von gesch\u00e4ftskritischen Open-Source-Systemen, darunter Betriebssysteme (z.B. Linux), Datenbanken (z.B. PostgreSQL), Konfigurationsmanagement (z.B. Ansible, Puppet) und Virtualisierung. Als engagierter Teil der Open-Source-Community unterst\u00fctzen wir unsere Kunden dabei, die Vorteile freier Software sicher, stabil und effizient in ihrer IT-Umgebung zu nutzen.","legalName":"credativ GmbH","foundingDate":"2025-03-01","duns":"316387060","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"},"address":{"@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#local-main-place-address"},"geo":{"@type":"GeoCoordinates","latitude":"51.1732374","longitude":"6.392010099999999"},"telephone":["+4921619174200","08002733284"],"contactPoint":{"@type":"ContactPoint","telephone":"08002733284","email":"vertrieb@credativ.de"},"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":["Monday","Tuesday","Wednesday","Thursday","Friday"],"opens":"09:00","closes":"17:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Saturday","Sunday"],"opens":"00:00","closes":"00:00"}],"email":"info@credativ.de","areaServed":"D-A-CH","vatID":"DE452151696"},{"@type":"Person","@id":"https:\/\/www.credativ.de\/en\/#\/schema\/person\/63430ac9e022ccceba0f8d53ffe6db12","name":"credativ Redaktion","description":"Dieser Account dient als Sammelpunkt f\u00fcr die wertvollen Beitr\u00e4ge ehemaliger Mitarbeiter von credativ. Wir bedanken uns f\u00fcr ihre gro\u00dfartigen Inhalte, die das technische Wissen in unserem Blog \u00fcber die Jahre hinweg bereichert haben. Ihre Artikel bleiben hier weiterhin f\u00fcr unsere Leser zug\u00e4nglich."},{"@type":"PostalAddress","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#local-main-place-address","streetAddress":"Hennes-Weisweiler-Allee 23","addressLocality":"M\u00f6nchengladbach","postalCode":"41179","addressRegion":"Deutschland","addressCountry":"DE"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.credativ.de\/en\/blog\/postgresql-en\/howto-centralized-and-semantic-logging-for-postgresql\/#local-main-organization-logo","url":"https:\/\/www.credativ.de\/wp-content\/uploads\/2025\/04\/credativ-logo-right.svg","contentUrl":"https:\/\/www.credativ.de\/wp-content\/uploads\/2025\/04\/credativ-logo-right.svg","caption":"credativ\u00ae"}]},"geo.placename":"M\u00f6nchengladbach","geo.position":{"lat":"51.1732374","long":"6.392010099999999"},"geo.region":"Germany"},"_links":{"self":[{"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/posts\/15073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/comments?post=15073"}],"version-history":[{"count":0,"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/posts\/15073\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/media?parent=15073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/categories?post=15073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.credativ.de\/en\/wp-json\/wp\/v2\/tags?post=15073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}