# Logs analysis

DevFeed: [Logs analysis](<https://devfeed.tech/articles/logs-analysis-34373.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/07/logs-analysis/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-07-13T12:15:00Z

Content type: opinion

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [database](<https://devfeed.tech/tags/database.md>), [logs](<https://devfeed.tech/tags/logs.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

The article proposes turning pgfouine's log analysis into SQL queries over PostgreSQL logs imported into the database. It also considers exposing CSV-formatted PostgreSQL logs through a system view, potentially backed by a partitioned table aligned with log rotation.

## Source excerpt

Nowadays to analyze logs and provide insights, the more common tool to use is pgfouine, which does an excellent job. But there has been some improvements in logs capabilities that we're not benefiting from yet, and I'm thinking about the CSV log format. So the idea would be to turn pgfouine into a set of SQL queries against the logs themselves once imported into the database. Wait. What about having our next PostgreSQL version, which is meant (I believe) to include CSV support in SQL/MED, to directly expose its logs as a system view?