Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.0-beta.1] Error: Class 'Phalcon\Logger' not found #14263

Closed
diplopito opened this issue Jul 25, 2019 · 3 comments
Closed

[4.0.0-beta.1] Error: Class 'Phalcon\Logger' not found #14263

diplopito opened this issue Jul 25, 2019 · 3 comments
Labels
bug A bug report status: low Low

Comments

@diplopito
Copy link
Contributor

Expected and Actual Behavior

Expected: Use Phalcon\Logger to log a message.
Actual Behavior: Error: Class 'Phalcon\Logger' not found

Can be reproduced using the code in the documentation (and replacing the proper path for the log):

<?php

use Phalcon\Logger;
use Phalcon\Logger\Adapter\Stream;

$adapter = new Stream('/logs/application.log');
$logger  = new Logger(
    'messages',
    [
        'main' => $adapter,
    ]
);

$logger->error('Something went wrong');

Error in Windows:

Fatal error: Uncaught Error: Class 'Phalcon\Logger' not found in D:\xampp\htdocs\phalcon\logger.php:7 Stack trace: #0 {main} thrown in D:\xampp\htdocs\phalcon\logger.php on line 7

Error in Linux

Fatal error: Uncaught Error: Class 'Phalcon\Logger' not found in /var/www/vhosts/xxx/yyy/logger.php:10\nStack trace:\n#0 {main}\n thrown in /var/www/vhosts/xxx/yyy/logger.php on line 10

Details

  • Phalcon version: 4.0.0.-beta.1
  • PHP Version: 7.2 & 7.3
  • Operating System: Linux / Windows
  • Installation type: installing via package manager / dll
  • Zephir version (if any):
  • Server: Apache
@diplopito diplopito changed the title Error: Class 'Phalcon\Logger' not found [4.0.0-beta.1] Error: Class 'Phalcon\Logger' not found Jul 25, 2019
@diplopito
Copy link
Contributor Author

Current class is Phalcon\Logger\Logger; will be replaced by Phalcon\Logger in next Beta.

@niden niden added 4.0 labels Aug 9, 2019
@ruudboon ruudboon reopened this Aug 19, 2019
@ruudboon
Copy link
Member

Looks like this isn't fixed in the beta.2 release

@sergeyklay
Copy link
Contributor

Fixed in the 4.0.x branch. Feel free to open a new issue if the problem appears again. Thank you the bug report.

@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

4 participants