Skip to content

Commit

Permalink
add override port
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancoisbbs committed Oct 11, 2016
1 parent d51603b commit 42d75f3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Distilleries/Logentries/LogentriesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Distilleries\Logentries\Services\LogEntriesWritter;
use Illuminate\Support\ServiceProvider;
use \LeLogger;
use Distilleries\Logentries\Services\LeLogger;

class LogentriesServiceProvider extends ServiceProvider
{
Expand Down
22 changes: 22 additions & 0 deletions src/Distilleries/Logentries/Services/LeLogger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Distilleries\Logentries\Services;

use \LeLogger as LG;

class LeLogger extends LG
{


public function getPort()
{
if ($this->isTLS())
{
return config('logentries.tls_port',self::LE_TLS_PORT);
}else{
return config('logentries.tcp_port',self::LE_PORT);
}
}


}
4 changes: 3 additions & 1 deletion src/config/config.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

return [
'token'=>env('LOG_ENTRIES_TOKEN')
'token' => env('LOG_ENTRIES_TOKEN', null),
'tls_port' => env('LOG_ENTRIES_TLS_PORT', null),
'tcp_port' => env('LOG_ENTRIES_TCP_PORT', null),
];

0 comments on commit 42d75f3

Please sign in to comment.