<commit_before>#!/usr/bin/perl

use LoxBerry::Log;
use Getopt::Long;

my $log;

# Collecting options
GetOptions (
	'action:s' => \$action,
	'package:s' => \$package,
	'name:s' => \$name,
	'filename:s' => \$logfilename,
	'logdir:s' => \$logdir,
	'append' => \$append,
	'nofile' => \$nofile,
	'stderr' => \$stderr,
	'stdout' => \$stdout,
	'message:s' => \$message,
	'loglevel:s' => \$loglevel,
);

if (!$action) { 
	init();
	start();
	exit(0);
}

$action = lc($action);

if( $action eq "new" ) {
	# print STDERR "initlog.pl: init\n";
	init();
	my $currfilename = $log->close;
	my $currloglevel = $log->loglevel;
	print "\"$currfilename\" $currloglevel\n";
	exit(0);
} elsif ( $action eq "logstart" ) {
	# print STDERR "initlog.pl: init\n";
	init();
	# print STDERR "initlog.pl: start\n";
	start();
	exit(0);
} elsif ( $action eq "logend" ) {
	# print STDERR "initlog.pl: init\n";
	$append = 1;<commit_msg>initlog.pl: All initlog.pl parameters accept a value<commit_after>#!/usr/bin/perl

use LoxBerry::Log;
use Getopt::Long;

my $log;

# Collecting options
GetOptions (
	'action:s' => \$action,
	'package:s' => \$package,
	'name:s' => \$name,
	'filename:s' => \$logfilename,
	'logdir:s' => \$logdir,
	'append:s' => \$append,
	'nofile:s' => \$nofile,
	'stderr:s' => \$stderr,
	'stdout:s' => \$stdout,
	'message:s' => \$message,
	'loglevel:s' => \$loglevel,
);

if (!$action) { 
	init();
	start();
	exit(0);
}

$action = lc($action);

if( $action eq "new" ) {
	# print STDERR "initlog.pl: init\n";
	init();
	my $currfilename = $log->close;
	my $currloglevel = $log->loglevel;
	print "\"$currfilename\" $currloglevel\n";
	exit(0);
} elsif ( $action eq "logstart" ) {
	# print STDERR "initlog.pl: init\n";
	init();
	# print STDERR "initlog.pl: start\n";
	start();
	exit(0);
} elsif ( $action eq "logend" ) {
	# print STDERR "initlog.pl: init\n";
	$append = 1;
{'fraction_non_alphanumeric': 0.23367512142471666, 'fraction_numerical': 0.004317323259579061, 'mean_word_length': 4.107438016528926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1037683', 'n_tokens_mistral': 824, 'n_tokens_neox': 800, 'n_words': 171}