Jump to content

new log file creation error form module


benbyf
 Share

Recommended Posts

Super confused, getting a error for this code to create a save message to log file:

public function init() {
	$log = $this->wire('log');
	$log->save("MyModuleName","working");
}

Error: Exception: Log name must contain only [-_.a-z0-9] with no extension (in /srv/users/serverpilot/apps/betaville-dev/public/wire/core/WireLog.php line 167)

Not sure how to fix this. Any help appreciated.
 

 

Link to comment
Share on other sites

12 hours ago, benbyf said:

[-_.a-z0-9]

By default regular expressions are case sensitive and in the message only a-z is displayed and I guess Ryan wanted to make sure there can be no issues with these filenames when writing to a case sensitive filesystem.

  • Like 2
Link to comment
Share on other sites

13 minutes ago, szabesz said:

By default regular expressions are case sensitive and in the warning only a-z is displayed and I guess Ryan wanted to make sure there can be no issues with these filenames when writing to a case sensitive filesystem.

If this is the case then I'm a total idiot. Thanks!

  • Like 1
  • Haha 1
Link to comment
Share on other sites

34 minutes ago, szabesz said:

I think you just did not drink enough coffee this morning ?

Or too much whisky last night...? I tend to do all my personal coding in the little hours with something to drink ?

  • Haha 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...