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
Labels
Projects

Comments

@diplopito
Copy link

@diplopito diplopito commented Jul 25, 2019

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

This comment has been minimized.

Copy link
Author

@diplopito diplopito commented Jul 25, 2019

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

@diplopito diplopito closed this Jul 25, 2019
@niden niden added this to To do in 4.0 Release via automation Aug 9, 2019
@niden niden moved this from To do to Done in 4.0 Release Aug 9, 2019
@ruudboon ruudboon reopened this Aug 19, 2019
4.0 Release automation moved this from Done to In progress Aug 19, 2019
@ruudboon

This comment has been minimized.

Copy link
Member

@ruudboon ruudboon commented Aug 19, 2019

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

@sergeyklay

This comment has been minimized.

Copy link
Member

@sergeyklay sergeyklay commented Aug 19, 2019

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

@sergeyklay sergeyklay closed this Aug 19, 2019
4.0 Release automation moved this from In progress to Done Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.0 Release
  
Done
4 participants
You can’t perform that action at this time.