Unofficial documentation how to do interesting things and work around problems in ProcessMaker
Forum rules: Unofficial documentation for features which have not been tested by Quality Assurance or may change in future versions of ProcessMaker
#812467
NOTE: this problem is solved in version 3.3.0 and later, so only use these instructions for PM 3.1 - 3.2. See: https://wiki.processmaker.com/3.3/Proce ... _On_or_Off

ProcessMaker added a new logging feature in version 3.1 and later to document every action taken by ProcessMaker. The log files are located at:
{install-directory}/processmaker/shared/sites/{workspace}/log/processmaker-YYYY-MM-DD.log
For example:
/opt/processmaker/shared/sites/workflow/log/processmaker-2017-09-19.log

This new logging is useful if your organization needs auditing of actions in ProcessMaker, but it also slows down ProcessMaker and consumes a large amount of disk space on the server.

If wishing to turn off the new logging, then edit the file {install-directory}/processmaker/gulliver/system/class.bootstrap.php with a plain text editor.
Changes lines 2945 - 2951 from:
Code: Select all
    public static function registerMonolog($channel, $level, $message, $context, $ws, $file = 'cron.log', $pathData = PATH_DATA)
    {
        $fileLog = $pathData .'sites'. PATH_SEP . $ws . PATH_SEP . 'log' . PATH_SEP . $file;

        $registerLogger = &MonologProvider::getSingleton($channel, $fileLog);
        $registerLogger->addLog($level, $message, $context);
    }
To:
Code: Select all
    public static function registerMonolog($channel, $level, $message, $context, $ws, $file = 'cron.log', $pathData = PATH_DATA)
    {
        $fileLog = $pathData .'sites'. PATH_SEP . $ws . PATH_SEP . 'log' . PATH_SEP . $file;

        //$registerLogger = &MonologProvider::getSingleton($channel, $fileLog);
        //$registerLogger->addLog($level, $message, $context);
    }
Now ProcessMaker won't add content to the log files.
#812472
If you want logging to be configurable from the env.ini file, then edit processmaker/workflow/engine/classes/class.system.php and add a "log_file" option by changing lines 52-84 from:
Code: Select all
    private static $defaultConfig = array(
        'debug' => 0,
        'debug_sql' => 0,
        'debug_time' => 0,
        'debug_calendar' => 0,
        'wsdl_cache' => 1,
        'memory_limit' => "256M",
        'time_zone' => 'America/New_York',
        'expiration_year' => '1',
        'memcached' => 0,
        'memcached_server' => '',
        'default_skin' => 'neoclassic',
        'default_lang' => 'en',
        'proxy_host' => '',
        'proxy_port' => '',
        'proxy_user' => '',
        'proxy_pass' => '',
        'size_log_file' => 5000000,
        'number_log_file' => 5,
        'ie_cookie_lifetime' => 1,
        'safari_cookie_lifetime' => 1,
        'error_reporting' => "",
        'display_errors' => 'On',
        'enable_blacklist' => 0,
        'system_utc_time_zone' => 0,
        'server_protocol' => '',
        'leave_case_warning' => 0,
        'server_hostname_requests_frontend' => '',
        'load_headers_ie' => 0,
        'redirect_to_mobile' => 0,
        'disable_php_upload_execution' => 0,
        'disable_download_documents_session_validation' => 0
    );
 
To:
Code: Select all
    private static $defaultConfig = array(
        'debug' => 0,
        'debug_sql' => 0,
        'debug_time' => 0,
        'debug_calendar' => 0,
        'wsdl_cache' => 1,
        'memory_limit' => "256M",
        'time_zone' => 'America/New_York',
        'expiration_year' => '1',
        'memcached' => 0,
        'memcached_server' => '',
        'default_skin' => 'neoclassic',
        'default_lang' => 'en',
        'proxy_host' => '',
        'proxy_port' => '',
        'proxy_user' => '',
        'proxy_pass' => '',
        'log_file'   => 'all',  //add this line
        'size_log_file' => 5000000,
        'number_log_file' => 5,
        'ie_cookie_lifetime' => 1,
        'safari_cookie_lifetime' => 1,
        'error_reporting' => "",
        'display_errors' => 'On',
        'enable_blacklist' => 0,
        'system_utc_time_zone' => 0,
        'server_protocol' => '',
        'leave_case_warning' => 0,
        'server_hostname_requests_frontend' => '',
        'load_headers_ie' => 0,
        'redirect_to_mobile' => 0,
        'disable_php_upload_execution' => 0,
        'disable_download_documents_session_validation' => 0
    );
 
Then, edit processmaker/gulliver/system/class.bootstrap.php and change lines 2945-2951 from:
Code: Select all
    public static function registerMonolog($channel, $level, $message, $context, $ws, $file = 'cron.log', $pathData = PATH_DATA)
    {
        $fileLog = $pathData .'sites'. PATH_SEP . $ws . PATH_SEP . 'log' . PATH_SEP . $file;

        $registerLogger = &MonologProvider::getSingleton($channel, $fileLog);
        $registerLogger->addLog($level, $message, $context);
    } 
To:
Code: Select all
    public static function registerMonolog($channel, $level, $message, $context, $ws, $file = 'cron.log', $pathData = PATH_DATA)
    {
        $fileLog = $pathData .'sites'. PATH_SEP . $ws . PATH_SEP . 'log' . PATH_SEP . $file;
        $aSysConf = \System::getSystemConfiguration();

        if ($aSysConf['log_file'] == 'all' or $aSysConf['log_file'] == '' or
           ($aSysConf['log_file'] == 'errors' and $level >= 400)) 
        {
            $registerLogger = &MonologProvider::getSingleton($channel, $fileLog);
            $registerLogger->addLog($level, $message, $context);
        }
    } 
Then, you can edit your workflow/engine/config/env.ini file and add one of the following lines to set the level of logging:
Code: Select all
log_file = "off"
log_file = "all"
log_file = "errors"
#826557
Amarilisis wrote:Hola, hay alguna forma de hacer que estos log se compriman automáticamente?
Puedes cambiar el codigo fuente para comprimir los archivos de bitacora, pero no será una buena idea porque PM tiene que descomprimir el archivo, agregar texto nuevo y comprimirlo de nuevo. El rendimiento sería horrible.

Si no tienes espacio en tu disco duro y estas usando versión 3.3.0 o después, puedes setear en tu archivo env.ini:
Code: Select all
logs_max_files=20
logging_level="ERROR"
Ver: https://wiki.processmaker.com/3.3/Proce ... _On_or_Off

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]