Skip to content

Commit

Permalink
feat: add create agent function to set a custom logger
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasalexandre9 committed Aug 1, 2023
1 parent 08df40e commit 8355b2e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Service/ForestAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public function __construct(private KernelInterface $appKernel, private EntityMa
$this->loadConfiguration();
}

public function createAgent(array $options = []): self
{
$this->agent->createAgent($options);

return $this;
}

public function addDatasource(DatasourceContract $datasource, array $options = []): self
{
$this->agent->addDatasource($datasource, $options);
Expand All @@ -48,6 +55,8 @@ public function addChart(string $name, \Closure $definition): self
public function use(string $plugin, array $options = []): self
{
$this->agent->use($plugin, $options);

return $this;
}

public function build(): void
Expand Down

0 comments on commit 8355b2e

Please sign in to comment.