mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 07:12:33 +00:00
fix: only show last 1000 lines
This commit is contained in:
1 parent
97027875bf
commit
3adc0bdd6e
2 files changed
+8
-3
No files matched your search
@@ -13,7 +13,7 @@ class GetLogs extends Component
|
||||
public Server $server;
|
||||
public ?string $container = null;
|
||||
public ?bool $streamLogs = false;
|
||||
|
||||
public int $numberOfLines = 1000;
|
||||
public function doSomethingWithThisChunkOfOutput($output)
|
||||
{
|
||||
$this->outputs .= $output;
|
||||
@@ -24,7 +24,7 @@ class GetLogs extends Component
|
||||
public function getLogs($refresh = false)
|
||||
{
|
||||
if ($this->container) {
|
||||
$sshCommand = generateSshCommand($this->server, "docker logs -t {$this->container}");
|
||||
$sshCommand = generateSshCommand($this->server, "docker logs -n {$this->numberOfLines} -t {$this->container}");
|
||||
if ($refresh) {
|
||||
$this->outputs = '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user