Keep Users Logged In As Long As I Like

What you found is actually perfectly accurate. With WP’s commitment to backwards compatibility it’s not that common for thing to stop working. This filter is used in wp_set_auth_cookie() to calculate the duration. Resulting value is used in PHP’s setcookie(). There is no mention of specifics limits in documentation, so in practice the value is limited … Read more

Core framework/helpers for logging stuff?

WordPress makes use of the reliable PHP error logging. It provides an API of it’s own and it’s fully documented here: Error Handling and Logging and often it’s already well integrated into server configurations. For optional logging you can just use trigger_error() with it’s default error-type notice (E_USER_NOTICE). Doing so will ensure you’re streamlined with … Read more

How to stop certain warning logging in error.log?

“Technically” it’s just a PHP warning and not an error, and you should not have warnings enabled on production servers. You can disable PHP from logging warnings and it will still log errors to the error log file. You can disable PHP warnings by setting it in a custom php.ini file on the server (all … Read more

Control verbosity level of WP DEBUG?

When WP_DEBUG is set, WordPress sets (via wp_debug_mode() call early in core load process) the error reporting level to E_ALL & ~E_DEPRECATED & ~E_STRICT. This means all warnings and errors except strict errors and PHP deprecated functions (not WordPress ones). You can define your own level in a custom mu-plugin (the override needs to be … Read more

Where is the Docker daemon log?

It depends on your OS. Here are the few locations, with commands for few Operating Systems: Ubuntu (old using upstart ) – /var/log/upstart/docker.log Ubuntu (new using systemd ) – sudo journalctl -fu docker.service Amazon Linux AMI – /var/log/docker Boot2Docker – /var/log/docker.log Debian GNU/Linux – /var/log/daemon.log CentOS – /var/log/message | grep docker CoreOS – journalctl -u docker.service Fedora – journalctl -u docker.service Red Hat … Read more

Swift: print() vs println() vs NSLog()

A few differences: print vs println:The print function prints messages in the Xcode console when debugging apps.The println is a variation of this that was removed in Swift 2 and is not used any more. If you see old code that is using println, you can now safely replace it with print.Back in Swift 1.x, print did not add newline characters at the end of … Read more

No handlers could be found for logger

For logging some message through logger, in Python at least one handler should be added to the logger object. By default the debug, warn and other functions in logging module will call basicConfig which in turn will add a StreamHandler to the root logger. It’s always recommended to add your required Handler to your logger … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)