Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Host configured but logs are not loaded nor shown #398

Open
kantmn opened this issue Oct 10, 2024 · 5 comments
Open

Remote Host configured but logs are not loaded nor shown #398

kantmn opened this issue Oct 10, 2024 · 5 comments

Comments

@kantmn
Copy link

kantmn commented Oct 10, 2024

Hi i have setup your log-viewer package inside my development environment.

two projects have the package installed and if i have understood it correctly
Project A (mainly the log-viewer) can access a remote host Project B (https://log-viewer.opcodes.io/docs/3.x/configuration/multiple-hosts)

config in Project A
'hosts' => [ 'local' => [ 'name' => ucfirst(env('APP_ENV', 'local')), ], 'toolero.ddev.site' => [ 'name' => 'projectA.ddev.site', 'host' => 'http://projectA.ddev.site/log-viewer', ], ],

config in Project B the remote host
`
'enabled' => env('LOG_VIEWER_ENABLED', true),

'api_only' => env('LOG_VIEWER_API_ONLY', true),

'require_auth_in_production' => false,

......

'hosts' => [
    'local' => [
        'name' => ucfirst(env('APP_ENV', 'local')),
    ],

],
`
no other var was changed
i have cleared the application cache

i can call the log-viewer url/api in my browser correctly when the api_only is set to false
if api_only is set to true the same url result in 404 not found, i would have expected an denied ?

also i can call the api via curl in console run curl projectb.ddev.site/log-viewer/api/folders etc it responds

when opening in project A inside my browser and switching via dropdown to the project b host, it looks it is loading something, but the ui remains the same, folders are unchanged and no files from project b are visible.

therefore i have checked the browser network analysis tab
after switch to host B, i can see there is a json response with an object which download_url seems to be the project b, but it responds with the local (project a) files.

i have configured project b with http: as it seems to have trouble with self signed testing cert, but in the download url it is using https:

am i doing something wrong here?
i do not see any error inside the laravel.log

any help is appreciated, and thanks for the good work

PS: for anyone also having issues using the custom log types, the docs seems not to be complete, take a look at the laravelLogLevel class and copy what is needed

@bhagat-abhishek
Copy link

@kantmn maybe you should re-look the config.
My suggessition are try with a fresh laravel install first. Hope you find some help.

@kantmn
Copy link
Author

kantmn commented Oct 21, 2024

@bhagat-abhishek well this is a fresh install already, and as far is see i followed the config guide.
that is why opened this support thread, to receive help.

i made it simpled, disable the authentication and only added the remote host to the config and added the package to the target host.

if you see the error please tell me

@bhagat-abhishek
Copy link

bhagat-abhishek commented Oct 21, 2024 via email

@arukompas
Copy link
Contributor

Project A config has a host that points to ProjectA as well. Shouldn't it point to Project B instead?

@bhagat-abhishek
Copy link

bhagat-abhishek commented Oct 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants