Skip to content

Commit 201fe06

Browse files
committed
Update sqlite-request-logs.md
1 parent de4c628 commit 201fe06

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

MyApp/_pages/sqlite-request-logs.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,31 @@ into the usage of your App.
9797
As SQLite Requests Logs also makes it efficiently possible to sort and filter through logs, the
9898
Logging UI will switch to using a fully queryable `AutoQueryGrid` when using `SqliteRequestLogger`:
9999

100-
![](/img/pages/sqlite/sqlite-request-logs.webp)
100+
![](/img/pages/sqlite/sqlite-request-logs.webp)
101+
102+
## Export to CSV
103+
104+
When needed you can export your Request Logs to CSV for easy import into external systems using SQLite's
105+
`sqlite3` utility, e.g:
106+
107+
:::sh
108+
sqlite3 -header -csv requests_<YYYY>-<MM>.db "SELECT * FROM RequestLog" > output.csv
109+
:::
110+
111+
### Custom Exports
112+
113+
For more complex queries, you can also use the `.mode csv` and `.output` commands within the SQLite shell:
114+
115+
:::sh
116+
sqlite3 requests_<YYYY>-<MM>.db
117+
:::
118+
119+
Then set export parameters before running the query and exiting:
120+
121+
```sql
122+
.headers on
123+
.mode csv
124+
.output output.csv
125+
SELECT * FROM RequestLog;
126+
.quit
127+
```

0 commit comments

Comments
 (0)