1c how to clear the log book. Setting up a log

On the 1C server, the folder grows in size over time
reg_1541, containing 1C logs. This folder is located in the directory C:\Program Files\1cv82\srvinfo. And as a result, a problem with free space on the system hard drive may arise. To avoid folder growth srvinfo It is necessary to periodically clear the 1C log.

Removing unused logs from the Srvinfo folder

The registration log records all changes to 1C database objects - documents, directories, registers, etc.

Each 1C database has its own log storage directory and it looks like this:

C:\Program Files\1cv8\srvinfo\\\1Cv8Log

Folder<Имя кластера сервера>by default it is called reg_1541.

After deleting the database from the 1C server, the log folder is not deleted from Srvinfo. Therefore, from the many folders in
Srvinfo may also contain those that have not been used for a long time and simply take up space on the hard drive.

You can find these folders by opening the file, which is also located in reg_1541.

Copy<Идентификатор базы на сервере>from the Srvinfo folder and look in the file 1CV8Clst.lst. If the identifier is not found in the file, then the folder can be deleted.


In the Srvinfo directory there is a folder with the name of the view snccntx+<Идентификатор базы на сервере> . This folder contains session data and it is better not to delete it unless necessary. it doesn't take up much space.

Setting up and clearing the 1C log

We launch 1C in configurator mode and go to the “Administration/Log Settings” menu

In the log settings, you can select which events will be logged:

Errors - information about failures
Warnings are important notifications, not errors.
Information - all database changes
Notes - all other notices

To clear the log, click the “Reduce” button

Here you can see the date range for which the data is stored.

In the “Delete events until:” field, select the date before which we will clear the registration log.

Automating the Log Clearing Process

Automating the process via the Windows command line looks like this:

"\1cv8.exe" CONFIG /Out /ReduceEventLogSize -saveAs

— connection string to the infobase. Because We are talking about the server version, this line will look like “/S /N /P”. The user must have administration rights.

— path to the file in which system messages will be saved when this operation is performed.

— the date by which the registration log will be shortened in the format yyyy-mm-dd

— path to a file in *.elf format, which can be accessed if necessary to conduct investigations of long-standing operations with the information base.

The operation must be performed when there are no active connections to the 1C database.

Sample PowerShell script

# # backup & shrink 1c logs # param ($1cexe = "C:\Program Files (x86)\1cv82\8.2.15.319\bin\1cv8.exe", $1cbase = "srvrname\ibname", $1cuser = "username ", $1cupassword = "password", $1coperlog = "s:\logs\1cshrink.txt", $1cdaysoflogstore = 7, #[date by which to delete logs] (get-date).Date.AddDays(-$1cdaysoflogstore) .ToString("yyyyMMdd") $1clogsarchive = "s:\backup\6months\", #[path to the *.elf log file saved elsewhere] $1clogfilename = $env:COMPUTERNAME.ToLower() + "-1clog- " + ($1cbase.split("\")) + "-" + (get-date).Date.ToString("yyyyMMdd") + ".elf") $1clog = $1clogsarchive + $1clogfilename cmd /c " `"`"$1cexe`" CONFIG `/s$1cbase `/N`"$1cuser`" `/P`"$1cupassword`" `/Out$1coperlog `/ReduceEventLogSize $((get-date).Date. AddDays(-$1cdaysoflogstore).ToString("yyyy-MM-dd")) -saveAs`"$1clog`"`""

Attention! Data for connecting to the 1C database is anonymized. You need to replace it with your own.

Transferring the log to another drive

To avoid filling the system disk with log files, the 1C folder SRVINFO can be transferred to another drive. This can be done by changing the startup parameters of the “1C:Enterprise 8.3 Server Agent” service in the Windows registry.

In the registry editor, go to the branch HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\1C:Enterprise 8.2 Server Agent and in the parameter ImagePath change the value “1C:Enterprise 8.3 Server Agent” “C:\Program Files (x86)\1cv8\8.3.10.2667\bin\ragent.exe” -srvc -agent -regport 1541 -port 1540 -range 1560:1591 -d “ C:\Program Files (x86)\1cv8\srvinfo".
Instead of “C:\Program Files (x86)\1cv8\srvinfo” we indicate the new directory for the location of the log.

editing the start of the “1C:Enterprise 8.3 Server Agent” service in the Windows registry

The article used

The 1C log is a special mechanism of the 1C platform versions 8.2 and 8.3, which allows you to record users’ work with the system. Using the log, you can find out who and when changed objects in the system: directories, documents, registers, etc. Below we will look at how to work with this mechanism, where 1C log files are stored, how it is configured, how to optimize the log and how you can completely clear the data.

Let's start with where the registration log in 1C is stored. There can be two options - for file and client-server operating modes.

File base

For 1C file databases, the log is located in the folder with the database. The location of the files can be found when starting the program in the database selection menu:

The path is highlighted in red. If we follow this path, we will see the following picture:

The 1Cv8Log folder is the directory containing the log.

  • If you are planning transfer file database and want to save the log history, you definitely need to copy the 1Cv8Log folder to the category of the new 1C database.
  • If it is needed clear the 1C registration log in the file database, just delete the 1Cv8Log folder.

Client-server database 1C SQL

In client-server mode, history files are usually stored on the server in the directory:

C:\Program Files\1cv8\srvinfo\<Имя кластера сервера>\<Идентификатор базы на сервере>\1Cv8Log

To transfer the 1C log for a SQL database, as well as for a file one, just move the folder to the location of the new database.

It’s the same with deletion - just delete this folder.

Log settings

To see the available settings, you need to go to and in the main menu find the item “Administration - Log Settings...”:

Get 267 video lessons on 1C for free:

The following logging settings are available in the interface that opens:

Here, in the “Register in event log” field, you can specify the details of the logged data. The “Do not log” option allows you to disable logging altogether. Other points are deciphered as follows:

  1. Errors— all possible failures and errors in the system;
  2. Warnings— important system messages that are not errors;
  3. Information— all information about changeable system data;
  4. Notes— unimportant messages (you can almost always turn them off).

Logbook optimization

Among the ways to optimize loading speed and working with the log are the following methods:

Register fewer events. Disabling the recording of messages that are not important to us will significantly reduce the amount of information and increase the speed of work.

Dividing log storage by periods. Changing the "Split log storage by period" setting to day (for large databases) / week (for medium-sized databases) can significantly improve log performance. The log files will be split in the 1Cv8Log folder into portions specified in the settings, and will have a form similar to 20140905000000.lgp, which shows the date and time the log was created.

Reducing the log also provides significant optimization in working with the log. To do this, click on the “Reduce” button in the settings. Select the period to which you want to reduce the log:

When using this method, it is strongly recommended to write deleted events to a separate file. This will allow you to restore history that was deleted from the 1C database log at any time.

And the last and most effective way to optimize is to transfer the registration log to the so-called “New format”. It is available starting from 1C platform version 8.3.5.1068. This format for storing the registration log is not in a text file, but in a separate database on the SQLite DBMS.

To switch to a new format, just convert the magazine by clicking the “New Format” button:

Be careful, reverse conversion to the old format impossible.

In the 1C system, there is also a system for analyzing technical information.

14.09.2018 15:26:36 1C:Servistrend ru

Where is the log book located in 1C 8.3?

The registration log is a 1C functionality that allows you to view information about events that occurred in a specific database and changes to documents. The journal consists of records, each of which is structured in detail: who, what, when and in what manner any operation was performed.

Thanks to the proper use of the log in 1C 8.3, you will be able to fully see the picture of interaction with the database, which can be extremely important in some cases. For example, in one document someone changed the number/date/cost or some other important detail, and you would like to find out who did it and when. There are also often cases when a document simply disappears in the database (that is, someone deleted it) - in this case, you cannot do without a logbook.

Let's move on to opening the registration log in 1C 8.3. In the program, select Menu – Tools – Options:

Make sure that the “Show All Functions” command is checked:

After that, open Menu – All functions:

Select Standard – Log:

You will see a log of the current database with a list of operations presented:

It can be viewed freely, but it contains many records of transactions occurring in the database without your participation (supporting the operation of various mechanisms). In order to filter out unnecessary information, you need to use selection.

For example, let’s ask ourselves a question: what did our chief accountant do today? Let's set the selection conditions:

By clicking OK, we get a list of user operations:

It is clear that she made changes to the payment order. Unfortunately, the log does not record the specific values ​​changed in the document. We only have access to the fact of change itself.

Now let’s see who entered the program today by setting the selection conditions for the “Session - Authentication” events:

By clicking OK, we get a list of users who accessed the database today:

There are many examples of using a log book. Combining the experience of our consultants, we can say that the log book is a powerful tool that allows you to answer many questions from accountants about whether someone has changed something somewhere without their knowledge.

Try different selection conditions and become familiar with the log book. It will allow you to monitor the actions of employees in the database and promptly detect unfounded changes.

You can display a report that will present various statistical information about the operation of the program, about errors (warnings) during its operation, about the number of active users and the time it took to complete routine tasks. To do this, you can use the log book, which reflects the main actions that were carried out by the user with the data contained in the 1C Accounting information system. To view the contents of the log, you must perform the following steps, as shown in Figure 1:

  1. In the “Administration” menu section, open the information system support and maintenance settings tab.
  2. Click the "Registration Log" hyperlink to open the corresponding report.
  3. Each event displayed in the log is recorded in a separate line of the document. The left column contains the date, time and an icon that displays its type: information, error, warning, note.
  4. The column “User, computer, application, session” reflects: the full name of the user, the name of the computer on the network, the application (for example, “Thin Client”, “Configurator”, “Background Job”, etc.) and session number.
  5. The column "Event, data and metadata, comment" reflects: the type of event, an indication of the program object (a specific list element, document, etc. is indicated) or the type of program object, its name (type of document, list, etc.) and a brief description of the situation.
  6. The "Transaction" column reflects changes in information in the 1C Accounting 8.3 program. The log shows the status of each transaction. It can be of the following types: “No transaction”, “Committed”, “Not completed” or “Canceled”. The presence of such information allows you to understand whether changes have actually been made to the data or not. The ability to select a status exists in the “Select log book” form, as shown in Figure 2.
  7. The list of events in the log is static, therefore, in order to view actions to change data that could have occurred after opening it, you should click the "Update current list" button (or F5 on your computer keyboard).
  8. In the "Show" field you can select a fixed number of records (the default is 200).
  9. In the quick selection field "Criticality" the default value is "All events". To see events of a specific type, you can select one of the values ​​- "Errors" or "Warnings".
  10. While working with the log, the user can select the data that is there according to a wide range of criteria: set the time interval of interest, select events by a specific employee (workstation), event, application, document, and other parameters. In order to filter events by one or more criteria, you can use the “Selection of logbook” procedure, which is launched by clicking the “Set selection” button, as shown in Figure 2, or by clicking on the “Selection:” link.
  11. The log allows you to customize the levels of events displayed.
  12. To complete the selection procedure, click the "Apply and close" button.
  13. Using list processing tools, the administrator of the 1C Accounting information system has the opportunity to upload the described journal in the form of text or spreadsheet, and then analyze and process it in the appropriate applications. The unloading procedure is shown in Figure 3.

In the automated 1C Accounting system, accounting is maintained in a special information base, which includes a certain program configuration, all accounting registers reflecting the facts of the company’s economic activities, and official information. All user operations with data contained in the infobase are reflected in the logbook. The specified information is not required in order to keep records in the automated 1C Accounting system, but may be useful in solving organizational issues.

The 1C Accounting 8.3 program uses the 1Cv8Log directory as the storage location for the described logs. At the same time, for each information base in each accounting period, its own unique registration log is created. It is very easy to determine the period for which the log contains information - information about the beginning of this period is contained in the name of the file with the log.

When organizing an information base with files, the storage location for the described log is the directory where the database itself is located. For example, if the database is located at C:/InfoBase/1Cv8.1CD, the log address will look like this: C:/InfoBase/1Cv8Log.

The registration log in 1C 8.3 is very useful in that it displays events that occurred in the information base, indicating the time, computer name and user name, and links to the data being changed. When users are authenticated, entries are also created in the log indicating the method of logging into the program. This mechanism allows you to answer one of the frequent questions - who last made changes to a specific object.

Where can I find the logbook in 1C 8.3? Through the menu “All functions” - “Standard” or, in typical 1C configurations, in the menu “Administration” - “Support and Maintenance”.

The logbook is configured in the configurator mode. In the “Administration” menu, select “Log Settings”.

Here you configure the events that will be displayed in the log.

Selecting the first setting item allows you to not keep a log at all. The remaining settings are arranged in ascending order of importance. If there are a large number of users, it is not recommended to register comments so as not to clog the database.

When creating a new infobase, the default mode for recording all events is set.

View and search records

When you open the logbook itself, at first glance it may seem that there is a lot of information and it is simply unrealistic to find it. Actually this is not true.

By default, 200 entries are displayed in the log. Displaying a large number of entries can negatively affect the performance of your program or simply cause it to freeze.

In the registration log list form, you can set selection and use the search. The search only applies to records that are already displayed (in this case, the last 200 events). The selection applies to all records.

The search is carried out using the displayed data in the tabular section, so when using it you only need to specify the column and data that you want to find.

Selection allows you to select data by specific users, computer names, events, etc. You also have the ability to display log entries only for specific metadata, data (a link to the desired object, for example, a specific document) and other settings are indicated.

This example shows the log settings for selecting all events of the user “Admin” starting from 06/20/2017.

Where is the 1cv8.lgd log file stored?

The location of the physical storage of the log directly depends on whether the file database or the client is a server database.

File base

With this placement mode, the registration log is located in the folder with the database itself. You can find out its location either from the list of databases or from the “About the program” help.

If you go to this address, you will find a folder named “1Cv8Log”. This is where the log data in the 1Cv8.lgd file is located.

If you need to transfer the database from one place to another, you can also copy this directory, then the log data will be transferred along with the database.

When you delete this directory, the log will be cleared.

Client-server base

In this mode, everything is the same as in the previous one, only the 1C log data is stored on the server. Most often its location is as follows:

  • C:\Program Files\1cv8\srvinfo\<место расположения информационной базы>\1Cv8Log

Optimization

The log can be optimized if necessary, especially when a large number of events occur in the database.

One way is to configure the registration of only certain events as discussed above. For example, there's no point in tracking notes if you simply don't need them.

In older platform releases, division of the log by period was available in the log settings. The entire log could be divided into separate files with a specified frequency (day, month, year, etc.).

Starting from version 1C platform 8.3.5.1068, the log is stored in a sqlite database file with the extension *.lgd, and this setting has become unavailable. This method of storing the log is much more productive than the old one.

How to reduce or delete the registration log in 1C

If you need to partially or completely clear the log entries, in the settings window, click on the “Reduce” button. In the window that appears, specify the date by which all records should be deleted. You can also save deleted entries to a file just in case.

Continuing the topic:
OS

How to receive SMS online via the Internet? To receive SMS online, there are special sites that provide a special virtual number to which you can receive...