Info | ||||
---|---|---|---|---|
| ||||
We want to provide you with the latest help content in your language as soon as possible. This page has been translated automatically and may contain grammatical errors or inaccuracies. We want this content to be useful to you. Please let us know at the bottom of this page if this information was helpful. View the original article in Russian: Окно лога |
Description
The log is used to display messages to the user. The message can be of one of three types:
...
Among other things, these three types of messages differ in icons:
...
Also, starting from ZennoPoster 7.2.1.0, messages can be assigned a background color
...
Messages are output to the log using the Alert action .
...
Appearance (Standard log)
...
Message display window
...
...
First, the icon corresponding to the type of message
...
is displayed, then the time of the message
...
and the actual text of the message
...
.
Sort by message type and color
...
Using the buttons in this section, you can filter the displayed messages by their type and / or color.
...
Auto-scrolling
...
If this option is enabled, the log window will automatically scroll, thus always showing the most recent message.
...
In the program settings, on the Other tab, you can change the conditions under which auto-scrolling will be disabled.
Auto row height
...
If the message is too large,
...
the line-height will be adjusted
...
to
...
fit it completely. If this option is disabled, then only the top line of this entire message will be displayed.
...
Clear log
...
...
Using this button, you can clear the window from all messages.
...
Buttons
Double click on an entry in the log
If you double-click on any entry in the log, the focus of the project will shift to the action that left this entry.
...
The buttons from the right block of the window are minimized when the height of the log window decreasesis reduced. To get access to them, you need to click on the corresponding button.
...
Log context menu
When you right-click (right-click) on an entry in the log, a context menu will appear
...
Show action in PM
The project that generated this message will open in ProjectMaker and focus on the action that sent the message.
Copy Action Id
The unique id of the action that sent the message will be saved to the clipboard. Example id is 3e6988d1-9518-4535-a6d2-f0a33420c730
. Then you can use this id to search for a project, for more information about searching for a project, see the article Search for a project
Copy message
When you select this item, the text of the message will be saved to the clipboard.
...
Note |
---|
The features described below are for advanced users. |
...
By default, all logs from all templates are written to one file. This behavior can be changed using C # code , which must be placed at the beginning of the template:
Code Block | ||
---|---|---|
| ||
// ПеренаправляемRedirect the логlog дляfor данногоthis шаблонаtemplate вto отдельныйa separate файлfile. project.LogOptions.LogFile = @ "D: \ log.txt"; // ДляA log каждогоfile потокаwill будетbe созданcreated свойfor логeach файлthread. // The names Кof имениthe файловfiles (вin нашемour случаеcase, log) will будутbe приписыватьсяassigned идентификаторыthread потоковIDs. project.LogOptions.SplitLogByThread = true; |
Extended version of the log
В настройках программы можно включить Расширенный лог. Для этого в верхнем меню кликаем по Редактирование затем Настройки, после выбираем вкладку Отладка и ищем пункт Расширенный вариант окна логаIn the program settings, you can enable the Extended log. To do this, in the top menu, click on Edit, then Settings, then select the Debug tab and look for the Advanced option of the log window. For the changes to take effect, you must restart ProjectMaker.
...
Unfortunately, it is impossible to write to this column using the standard Alert action (at the time of this writing, the latest version of the program is 7.1.6.1). To do this, you must use the Custom C # code cube and have minimal knowledge of working with C # code.
There are three four methods for displaying messages in the log. - project.SendInfoToLog, project.SendWarningToLog, project.SendErrorToLog
(с помощью этого метода можно задавать цвет сообщениям).
Each of these methods has an overload (the work in all three the project.SendInfoToLog, project.SendWarningToLog, project.SendErrorToLog
methods is identical, so here we will only consider project.SendInfoToLog
)
Code Block | ||
---|---|---|
| ||
// Первый вариант метода The first version of the method. // АргументыArguments: // 1й1st - строка, которая выведется в колонке "Сообщение"the line that will be displayed in the "Message" column // 2й2nd - bool, надо ли выводить это сообщение в логwhether it is necessary to display this message in the ZennoPoster log project.SendInfoToLog ("Message", true); // ВторойSecond вариантoption: // АргументыArguments: // 1й1st - строка, которая выведется в колонке "Сообщение" // 2й - строка, данная строка появится в безымянной колонкеthe line that will be displayed in the "Message" column // 2nd - row, this row will appear in an unnamed column. // 3й3rd - bool, надо ли выводить это сообщение в лог whether it is necessary to display this message in the ZennoPoster log project.SendInfoToLog ("Message", "Way", true); |
...
in multithreaded work, you can enter the account name in the Untitled column, and the action that this account is currently performing in Messages . If the need arises, you can either group messages by this column (this is done by right-clicking on the title and selecting the appropriate option), or set up a filter.
it may be necessary to write large templates that perform many functions in one pass, for example - registration, filling out a profile, searching for a product, parsing and processing goods, publishing processed data (and all this is one template execution). Each of the described parts can contain many actions. So when logging into the Nameless column, you can write that part of the template in which the execution is now located, and write a specific action in Messages .
...
Useful links
Notification (Notification / Logging)
Search by project