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

MAGEDOC-3489 Cron logging updates #3662

Merged
merged 8 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from 6 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
241 changes: 25 additions & 216 deletions guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The static view files deployment command enables you to write {% glossarytooltip

The term *static view file* refers to the following:

- "Static" means it can be cached for a site (that is, the file is not dynamically generated).
_ "Static" means it can be cached for a site (that is, the file is not dynamically generated).
Examples include images and {% glossarytooltip 6c5cb4e9-9197-46f2-ba79-6147d9bfe66d %}CSS{% endglossarytooltip %} generated from LESS.
- "View" refers to the presentation layer (from MVC).
- "View" refers to the presentation layer (from MVC).

Static view files are located in the `<your Magento install dir>/pub/static` directory, and some are cached in the `<your Magento install dir>/var/view_preprocessed` directory as well.

Expand Down Expand Up @@ -50,220 +50,29 @@ Command options:

The following table explains this command's parameters and values.

<table>
<col width="25%" />
<col width="60%" />
<col width="10%" />
<col width="10%" />
<tbody>
<tr>
<th>Option</th>
<th>Description</th>
<th>Required?</th>
</tr>
<tr>
<td>&lt;languages&gt;</td>
<td>
<p>Space-separated list of <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639</a> language codes for which to output static view files. (Default is
<code>en_US</code>.)</p>
<p>You can find the list by running <code>bin/magento info:language:list</code>.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--language (-l)</td>
<td>
<p>Generate files only for the specified languages. The default, with no option specified, is to generate files for all <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639</a> language codes. You can specify the name of one language code at a time. Default value is <b>all</b>.</p>
<p>For example, <code>--language en_US --language es_ES</code></p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--exclude-language</td>
<td>
<p>Generate files for the specified language codes. The default, with no option specified, is to exclude nothing. You can specify the name of one language code or a comma-separated list of language codes. Default value is <b>none</b>.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--theme &lt;theme&gt;</td>
<td>
<p>Themes for which to deploy static content. Default value is <b>all</b>.</p>
<p>For example, <code>--theme Magento/blank --theme Magento/luma</code></p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--exclude-theme &lt;theme&gt;</td>
<td>
<p>Themes to exclude when deploying static content. Default value is <b>none</b>.</p>
<p>For example, <code>--exclude-theme Magento/blank</code></p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--area (-a)</td>
<td>
<p>Generate files only for the specified areas. The default, with no option specified, is to generate files for all areas. Valid values are <code>adminhtml</code> and <code>frontend</code>. Default value is <b>all</b>.</p>
<p>For example, <code>--area adminhtml</code></p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--exclude-area</td>
<td>
<p>Do not generate files for the specified areas. The default, with no option specified, is to exclude nothing. Default value is <b>none</b>.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--jobs (-j)</td>
<td>
<p>Enable parallel processing using the specified number of jobs. The default is 0 (do not run in parallel processes). Default value is <b>0</b>.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--symlink-locale</td>
<td>
<p>Create symlinks for the files of those locales, which are passed for deployment, but have no customizations.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--content-version=CONTENT-VERSION</td>
<td>
<p>Custom version of static content can be used if running deployment on multiple nodes to ensure that static content version is identical and caching works properly.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-javascript</td>
<td>
<p>Do not deploy JavaScript files</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-css</td>
<td>
<p>Do not deploy CSS files.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-less</td>
<td>
<p>Do not deploy LESS files.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-images</td>
<td>
<p>Do not deploy images.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-fonts</td>
<td>
<p>Do not deploy font files.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>
<p>--no-html</p>
</td>
<td>
<p>Do not deploy HTML files.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-misc</td>
<td>
<p>Do not deploy other types of files (that is <code>.md</code>, <code>.jbf</code>, <code>.csv</code>, <code>.json</code>, <code>.txt</code>, <code>.htc</code>, or <code>.swf</code> files).</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--no-html-minify</td>
<td>
<p>Do not minify HTML files.</p>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>
-s
<ul>
<li>-s quick</li>
<li>-s standard</li>
<li>-s compact</li>
</ul>
</td>
<td>
Define the deployment strategy. Use these options only if you have more than one locale.
<ul>
<li>Use the <a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-deploy-strategies.html#static-file-quick">quick strategy</a> to minimize deployment time. This is the default command option if not specified.</li>
<li>Use the <a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-deploy-strategies.html#static-file-standard">standard strategy</a> to deploy all static view files for all packages.</li>
<li>Use the <a href="{{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-deploy-strategies.html#static-file-compact">compact strategy</a> to conserve disk space on the server.
</li>
</ul>
</td>
<td>
<p>No</p>
</td>
</tr>
<tr>
<td>--force (-f)</td>
<td>
<p>Deploy files in any mode. (by default, the static content deployment tool can be run only in production mode. Use this option to run it in default or developer mode).</p>
</td>
<td>
<p>No</p>
</td>
</tr>
</tbody>
</table>
|Option|Description|Default|Required?|
|--- |--- |--- |
|-languages|Space-separated list of ISO-639 language codes for which to output static view files. You can find the list by running bin/magento info:language:list.|en_US|No|
|--language (-l)|Generate files only for the specified languages. The default, with no option specified, is to generate files for all ISO-639 language codes. You can specify the name of one language code at a time. <br />For example, --language es_ES|all|No|
|--exclude-language|Generate files for the specified language codes. The default, with no option specified, is to exclude nothing. You can specify the name of one language code or a comma-separated list of language codes.|none|No|
|--theme theme|Themes for which to deploy static content. <br />For example, --theme Magento/blank --theme Magento/luma|all|No|
|--exclude-theme theme|Themes to exclude when deploying static content.<br />For example, --exclude-theme Magento/blank|none|No|
|--area (-a)|Generate files only for the specified areas. The default, with no option specified, is to generate files for all areas. Valid values are adminhtml and frontend.<br />For example, --area adminhtml|all|No|
|--exclude-area|Do not generate files for the specified areas. The default, with no option specified, is to exclude nothing.|none|No|
|--jobs (-j)|Enable parallel processing using the specified number of jobs.|0|No|
|--symlink-locale|Create symlinks for the files of those locales, which are passed for deployment, but have no customizations.| |No|
|--content-version=CONTENT-VERSION|Custom version of static content can be used if running deployment on multiple nodes to ensure that static content version is identical and caching works properly.| |No|
|--no-javascript|Do not deploy JavaScript files| |No|
|--no-css|Do not deploy CSS files.| |No|
|--no-less|Do not deploy LESS files.| |No|
|--no-images|Do not deploy images.| |No|
|--no-fonts|Do not deploy font files.| |No|
|--no-html|Do not deploy HTML files.| |No|
|--no-misc|Do not deploy other types of files (that is .md, .jbf, .csv, .json, .txt, .htc, or .swf files).| |No|
|--no-html-minify|Do not minify HTML files.| |No|
|-s<br />-s quick<br />-s standard<br />-s compact|Define the deployment strategy. Use these options only if you have more than one locale. <br />Use the quick strategy to minimize deployment time. <br />Use the standard strategy to deploy all static view files for all packages. <br />Use the compact strategy to conserve disk space on the server.|quick|No|
|--force (-f)|Deploy files in any mode. By default, the static content deployment tool can be run only in production mode. Use this option to run it in default or developer mode.|production|No|
{:style="table-layout:auto;"}

{: .bs-callout .bs-callout-info}
If you specify values for both `<languages>` and `--language`, `<languages>` takes precedence.
Expand Down
37 changes: 20 additions & 17 deletions guides/v2.2/config-guide/cli/config-cli-subcommands-cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ To remove the Magento crontab:
1. Log in as or switch to the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html).
2. Change to the Magento installation directory.
3. Enter the following command:

php bin/magento cron:remove
`bin/magento cron:remove`

{:.bs-callout .bs-callout-info}
This command has no effect on cron jobs outside the `#~ MAGENTO START` and `#~ MAGENTO END` comments in your crontab.
Expand All @@ -39,19 +38,19 @@ This command has no effect on cron jobs outside the `#~ MAGENTO START` and `#~ M

Command options:

```bash
bin/magento cron:run [--group="<cron group name>"]
```

where `--group` specifies the cron group to run (omit this option to run cron for all groups)

To run the indexing cron job, enter:

`php bin/magento cron:run --group index`

`bin/magento cron:run --group index`

To run the default cron job, enter:

`php bin/magento cron:run --group default`

`bin/magento cron:run --group default`

To set up custom cron jobs and groups, see [Configure custom cron jobs and cron groups]({{ page.baseurl }}/config-guide/cron/custom-cron.html).

Expand All @@ -60,25 +59,29 @@ You must run cron twice: the first time to discover tasks to run and the second

## Logging

System logs provide detailed information for debugging. The following attributes apply to Magento cron logs:
All `cron` job information has moved from `system.log` into a separate `cron.log`.
By default, the cron information can be found at `<install_directory>/var/log/cron.log`.
All exceptions from cron jobs are logged by `\Magento\Cron\Observer\ProcessCronQueueObserver::execute`.

- All exceptions from cron jobs are logged by `\Magento\Cron\Observer\ProcessCronQueueObserver::execute`.
In addition to being logged in `cron.log`:

- Failed jobs with `ERROR` and `MISSED` statuses are logged to the `<your Magento install dir>/var/log` directory.
- Failed jobs with `ERROR` and `MISSED` statuses are logged to the `<install_directory>/var/log/support_report.log`.

- Jobs with an `ERROR` status are always logged as `CRITICAL` in `<your Magento install dir>/var/log/exception.log`.
- Jobs with an `ERROR` status are always logged as `CRITICAL` in `<install_directory>/var/log/exception.log`.

- Jobs with a `MISSED` status are logged as `INFO` in the `<your Magento install dir>/var/log` directory (developer mode only).
- Jobs with a `MISSED` status are logged as `INFO` in the `<install_directory>/var/log/debug.log` directory (developer mode only).

{%
include note.html
type='info'
content='All cron data is also written to the `cron_schedule` table in the Magento database. The table provides a history of cron jobs, including:
- Job ID and code
- Status
- Created date
- Scheduled date
- Executed date
- Finished date

- Job ID and code
- Status
- Created date
- Scheduled date
- Executed date
- Finished date

To see records in the table, log in to the Magento database on the command line and enter `SELECT * from cron_schedule;`.'
%}
Loading