Make WindowsDevice for Sonar
Summary: This diff adds the ability for a windows desktop app to be a selectable device for Sonar. just to over-communicate what I'm thinking regarding the logging: windows system logs don't have a lot of valuable information in my experience, and there is a ton of garbage, but there is probably a way to tap into that if we want. however, I was thinking that redirecting stderr/stdout from every connected process would be useful. i.e. OVRServer could register a log plugin and it would write to the device's log output. not sure if this would be better than just having a logger plugin. This is probably a pretty naive question and this probably isn't the place to have this conversation...but here we are :) Reviewed By: jknoxville Differential Revision: D8861986 fbshipit-source-id: f6ccba28729692ae4566dd24302268ad54d437eb
This commit is contained in:
committed by
Facebook Github Bot
parent
1a7ef4fc85
commit
b552dc6f52
21
src/dispatcher/windowsDevice.js
Normal file
21
src/dispatcher/windowsDevice.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
|
||||
import WindowsDevice from '../devices/WindowsDevice';
|
||||
|
||||
export default (store: Store, logger: Logger) => {
|
||||
if (process.platform !== 'win32') {
|
||||
return;
|
||||
}
|
||||
store.dispatch({
|
||||
type: 'REGISTER_DEVICE',
|
||||
payload: new WindowsDevice(),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user