# Using pt-query-digest to convert general log to slow log format for pt-index-usage ?

**URL:** <https://forums.percona.com/t/using-pt-query-digest-to-convert-general-log-to-slow-log-format-for-pt-index-usage/4155>\
**Category:** Percona Toolkit\
**Created:** [April 13, 2015, 6:11pm UTC](https://forums.percona.com/t/using-pt-query-digest-to-convert-general-log-to-slow-log-format-for-pt-index-usage/4155 "2015-04-13T18:11:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheer](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sheer](https://forums.percona.com/u/sheer)\
**Post date:** [April 13, 2015, 6:11pm UTC](https://forums.percona.com/t/using-pt-query-digest-to-convert-general-log-to-slow-log-format-for-pt-index-usage/4155/1 "2015-04-13T18:11:03Z")

</div>

In the most recent pt-index-usage manual, it says to use pt-query-digest to convert the general log to slow log format first. However, I can’t find any way with the most recent pt-query-digest tool to convert the general log to slow log - the --print option seems to have gone missing. Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [April 18, 2015, 4:51pm UTC](https://forums.percona.com/t/using-pt-query-digest-to-convert-general-log-to-slow-log-format-for-pt-index-usage/4155/2 "2015-04-18T16:51:24Z")

</div>

I haven’t tried this but reading through the pt-query-digest manual you can convert general\_log file to slow\_log file using --type and -output like:

> pt-query-digest --type genlog \<general\_log.file\> --output slowlog \> slow\_log.txt

Then parse slow\_log.txt with pt-index-usage.
