Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Update the debug logging commands #3625

Merged
merged 4 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions guides/v2.2/config-guide/cli/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ functional_areas:

## Debug logging

By default, Magento writes debug logs to the `var/log/debug.log` file inside the Magento application directory.
By default, Magento writes to the debug log (`<install_directory>/var/log/debug.log`) when it is in default or develop mode, but not when it is in production mode. Use the `bin/magento setup:config:set --enable-debug-logging=true | false` command to change the default value.

To enable debug logging:
{:.bs-callout .bs-callout-info}
As of Magento 2.2.8, you can no longer use the `bin/magento config:set dev/debug/debug_logging 0 | 1` command to enable or disable debug logging for current mode.

1. Use the `config:set` command to change the `dev/debug/debug_logging` database value to `1`.
#### To enable debug logging:

1. Use the `setup:config:set` command to enable debug logging for the current mode.

```bash
bin/magento config:set dev/debug/debug_logging 1
bin/magento setup:config:set --enable-debug-logging=true
```

1. Flush the cache.
2. Flush the cache.

```bash
bin/magento cache:flush
```

To disable debug logging:
#### To disable debug logging:

1. Use the `config:set` command to change the `dev/debug/debug_logging` database value to `0`.
1. Use the `setup:config:set` command to disable debug logging for the current mode.

```bash
bin/magento config:set dev/debug/debug_logging 0
bin/magento setup:config:set --enable-debug-logging=false
```

1. Flush the cache.
Expand All @@ -41,6 +44,7 @@ To disable debug logging:
bin/magento cache:flush
```


## Database logging

By default, Magento writes database activity logs to the `var/debug/db.log` file inside the Magento application directory.
Expand All @@ -56,7 +60,7 @@ To enable database logging:
bin/magento dev:query-log:disable
```

1. Flush the cache.
2. Flush the cache.

```bash
bin/magento cache:flush
Expand Down
17 changes: 11 additions & 6 deletions guides/v2.3/config-guide/cli/logging.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
group: configuration-guide
title: Logging
redirect_from: /guides/v2.3/logging.html

functional_areas:
- Configuration
- System
Expand All @@ -11,28 +13,31 @@ functional_areas:

## Debug logging

By default, Magento writes debug logs to the `var/log/debug.log` file inside the Magento application directory.
By default, Magento writes to the debug log (`<install_directory>/var/log/debug.log`) when it is in default or develop mode, but not when it is in production mode. Use the `bin/magento setup:config:set --enable-debug-logging=true | false` command to change the default value.

{:.bs-callout .bs-callout-info}
As of Magento 2.3.1, you can no longer use the `bin/magento config:set dev/debug/debug_logging 0 | 1` command to enable or disable debug logging for current mode.

#### To enable debug logging:

1. Use the `config:set` command to change the `dev/debug/debug_logging` database value to `1`.
1. Use the `setup:config:set` command to enable debug logging for the current mode.

```bash
bin/magento config:set dev/debug/debug_logging 1
bin/magento setup:config:set --enable-debug-logging=true
```

1. Flush the cache.
2. Flush the cache.

```bash
bin/magento cache:flush
```

#### To disable debug logging:

1. Use the `config:set` command to change the `dev/debug/debug_logging` database value to `0`.
1. Use the `setup:config:set` command to disable debug logging for the current mode.

```bash
bin/magento config:set dev/debug/debug_logging 0
bin/magento setup:config:set --enable-debug-logging=false
```

1. Flush the cache.
Expand Down
1 change: 0 additions & 1 deletion guides/v2.3/config-guide/logging.md

This file was deleted.