Skip to content

feat(preview-api): expose api for getting logs from preview app #4131

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

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Nov 14, 2018

PR Checklist

What is the current behavior?

No api for getting logs from preview app

What is the new behavior?

tns.previewDevicesService.on("deviceLogData", (deviceId, log) => {
    console.log(`received log ${log} from device: ${deviceId}`);
});

@Fatme Fatme changed the title feat(preview-api): Add api for getting logs from preview app feat(preview-api): expose api for getting logs from preview app Nov 14, 2018
@@ -1,16 +1,24 @@
import { DEVICE_LOG_EVENT_NAME } from "../common/constants";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to add the DEVICE_LOG_EVENT_NAME string in the previewAppLogProvider itself instead of using the constants. In this way it will be also available in the public API and we will not require a hardcoded string (deviceLogData). Also the data suffix in the event name is a little bit strange. It could be just "deviceLog"

@Fatme Fatme merged commit 5df9866 into release Nov 16, 2018
@Fatme Fatme deleted the fatme/device-log-preview-api branch November 16, 2018 06:04
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

Successfully merging this pull request may close these issues.

2 participants